Monday, May 27, 2013

Microsoft Entity framework (EF) Code First and Creating the DB using Domain entities.

Have been reading NHibernate fluent api and Microsoft Entity Framework EF.
Thought of using the Microsoft EF putting NHibernate fluent api aside.
I was able to find lot of help documents which relates to Microsoft EF also some good tutorials.
Having done the analysis of the domain model I was able to identify the domain concept which belongs to mobile operator's side.
Turn all the concepts into domain entities and create the data base using Microsoft EF code first.
without touching the MS Sql server.

Figure 1 shows the Domain Entities layout in the code

Figure 1



Figure 2 shows how the EF fluent API use to create the db using the entities.

Figure 2



Figure 3 shows how the Generated DB looks like using the EF fluent API.

Figure 3