Karl Gjertsen

Architect, Developer, Speaker, Bad Golfer,
Raygun brand ambassador and creator of Infiniforms

Misc

nHibernate: Flush vs Commit

Whilst working on a legacy project, I had to look at an issue with using nHibernate and ran into the Flush method. As I was new to nHibernate, I had to investigate what this did! using (var transaction = session.BeginTransaction()) {     session.Save(entity);     session.Flush();     transaction.Commit(); } Calling Flush on the Session synchronises the data in the session with the data in the database. Using Flush():…

Entity Framework Error 0019

Having deployed a new website to Microsoft Azure, I got an error: Schema specified is not valid. Errors: SqlDatabase.csdl(3,4) : error 0019: The EntityContainer name must be unique. An EntityContainer with the name ‘xxxxxxxxxxx’ is already defined. After some digging around, I found the error is a result of having multiple edmx files using the same container name. This seems…