Posts

Generate ADO.Net Entity Framework Connection String on RunTime

When application uses ADO.Net Entity framework, by default connection string saves in web.config file. We can delete the default connection string from web.config file and pass the connection string to the context object as follows.   using System.Data.SqlClient; using System.Data.EntityClient; //ConnectionString would be normal sql connection string  string connectionString = ConfigurationManager .ConnectionStrings[ "ConnectionString" ].ConnectionString;                SqlConnectionStringBuilder sqlBuilder = new SqlConnectionStringBuilder (connectionString); EntityConnectionStringBuilder entityBuilder = new EntityConnectionStringBuilder (); entityBuilder.Provider = "System.Data.SqlClient" ; entityBuilder.ProviderConnectionString = sqlBuilder.ToString(); entityBuilder.Metadata = @"res://*/Entities.csdl|res://*/ Entities.ssdl|res://*/ Entities.msl" ;   EntityConnection conn = ne...

Create ADO.Net Entity Framework Complex Type

Complex Type creation in ADO.Net Framework: http://blogs.msdn.com/b/nihitk/archive/2010/04/23/ado-net-entity-designer-in-vs-2010-stored-procedure-return-type-shape-sensing.aspx Table Valued Functions Mapping: http://blogs.msdn.com/b/efdesign/archive/2011/01/21/table-valued-function-support.aspx

ADO.Net Entity Framework vs Linq to Sql Classes

http://www.scip.be/index.php?Page=ArticlesNET12

Comparing collections in .NET

This article explained from Simple comparison to Complex comparison. http://robertbouillon.com/2010/04/29/comparing-collections-in-net/

Copy Content Types

Sharepoint Automation of Copy Content Types to another Site: http://stsadm.blogspot.com/2007/08/copy-content-types.html

ASP.Net Page PostBacks & Callbacks

http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/pagepost_clientcall.htm http://www.ajaxmatters.com/2006/05/creating-an-ajax-enabled-grid-using-icallbackeventhandler-part-1/ http://msdn.microsoft.com/en-us/library/ms178208.aspx http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=119#start

log4net AdoNetAppender Connection String from App Config

Currently log4net version 1.2.10.0 is not supporting reading connection strings from or directly. But in order to read connection string from < appSettings>, we have to  override ActivateOptions and ConnectionString property of AdoNetAppender.  Here is the code: AppSettingsConnectionStringAdoNetAppender.cs file namespace MyNameSpace { [ Serializable ()]     public class AppSettingsConnectionStringAdoNetAppender : AdoNetAppender     {         public override void ActivateOptions()         {             PopulateConnectionString();                         base .ActivateOptions();         }         private void Popul...