2. We will be creating project in three parts..
• Creating database in code…(EF code first)
• Defining context for DB
• Writing services.
For 1st two create new project with class
library
For services use WCF service library
All code is done in VS 2013 and follow namespace properly…….and also add
reference of NuGet packafe EF 6
3. For creating database in this model we write normal
coding classes as in programs, these classes with [data
contract] attribute transfer into database table and [data
member] attribute transfer into its attribute.
4. Now we define a context for accessing and
interacting with database
Here dbcontext is class defined in namespaces
System.data.enitity as
defined in slides for accessing databse.
5.
6. Now we write the interfaces that
will be accessible by clients ….ie
functionality that can be visible
on client side
Tags placed over interfaces act as
operation available for client to
access. ie…as it is a WCF service
7. now writing code for above functionality ie
interface and defining various logic ….// as
sample given for idea
8.
9.
10. DATABASE part all done just need to
write a class for accessing service that
will handle client call.
11.
12.
13. Entity model of classes built……
visual way for checking if a proper
Db is generated
14. Various DB table created after running code for first time
in (localdb)v11.0
Table are created only if Db by that context is not there
previously.
15.
16.
17. THANK YOU
For any query and help in making different
UI connection and config parts drop me a
mail : shivang.tyagi21@yahoo.in