TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Smart Lucky
NA
555
639.2k
How to insert Data in individual Database using FluentNhiben
Dec 31 2014 5:59 AM
Hi friends
i have 3 database with same schema, i want to first database product table data and insert this table data in to remaining database product tables mean databases are individual but schema is same (may be database on individual machines but schema is same), and i am using following configuration for database fluentnhibenate so is it possible to do that, if it is possible can any one help me please......
Thanks
public static void InitializeSessionFactory(string connectionString = "Data Source=local;Initial Catalog=mydb;Integrated Security=true;")
{
_sessionFactory = Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2008
.ConnectionString(connectionString).ShowSql()
)
.Mappings(m =>
m.FluentMappings
.AddFromAssemblyOf<Category>())
.ExposeConfiguration(cfg => new SchemaExport(cfg)
.Create(false, false))
.BuildSessionFactory();
}
public static ISessionFactory SessionFactory
{
get
{
if (_sessionFactory == null)
InitializeSessionFactory();
return _sessionFactory;
}
}
public static ISession OpenSession()
{
return SessionFactory.OpenSession();
}
Reply
Answers (
0
)
send mail asp net c# in folder directory.
Fetching data in grid view Edit Mode