SQL Server CE (Compact edition) is commonly used for small applications as this would not need any packaging and is a simple file copy.
Using FluentNHibernate with SQL Server CE 3.5 file has a flaw in which any changes to mapping would not be reflected in the database unless the database is re-created.
Now this has been solved in the latest version of SQL Server CE 4.0, where in any changes are automatically reflected in the database.
Here is code to configure SQL Server CE
MsSqlCeConfiguration sqlconfig = MsSqlCeConfiguration.Standard.ConnectionString(ConnectionString); FluentConfiguration fc = Fluently.Configure(); fc = fc.Database(sqlconfig ); ISessionFactory sessionFactory = fc.Cache(c => c .UseQueryCache() .ProviderClass()) .Mappings(m => m .FluentMappings.AddFromAssemblyOf ()) .ExposeConfiguration((NHibernate.Cfg.Configuration config) => new SchemaUpdate(config) .Execute(false, true)) .BuildSessionFactory();
Telegraphs are machines for conveying information over extensive lines with great rapidity.
Charles Babbage
Great Article
ReplyDeleteASP.NET MVC Training
Online MVC Training
Online MVC Training India
Dot Net Training in Chennai
.Net Online Training
.net training online
Dot Net Online Training
C# Training