Click here to Skip to main content
15,884,838 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Tcp Shared Messages Pin
CodingLover30-May-12 16:00
CodingLover30-May-12 16:00 
GeneralRe: Tcp Shared Messages Pin
trampel_ba1-Jun-12 23:32
trampel_ba1-Jun-12 23:32 
GeneralRe: Tcp Shared Messages Pin
MicroVirus8-Jun-12 10:36
MicroVirus8-Jun-12 10:36 
GeneralRe: Tcp Shared Messages Pin
trampel_ba10-Jun-12 5:01
trampel_ba10-Jun-12 5:01 
Question.net MVC in 3.5 Pin
InderK26-May-12 19:32
InderK26-May-12 19:32 
AnswerRe: .net MVC in 3.5 Pin
Abhinav S27-May-12 7:40
Abhinav S27-May-12 7:40 
AnswerRe: .net MVC in 3.5 Pin
Sandeep Mewara27-May-12 19:53
mveSandeep Mewara27-May-12 19:53 
GeneralEntity Framework Pin
Idle_Force25-May-12 10:02
Idle_Force25-May-12 10:02 
I would like to discuss the process of setting up the Entity framework. It has some learning curves to it and would like to outline the process and share this with others. Help me fill in the blanks and add comments as you have learned it. Realize the object names in the container look just like your tables and fields - so your will not be exactly like the example here.

Most database objects have a Fill method. So how does Entity load the model, with the creation of the Entity Container! Too simple? I think so. If you have not learned LINQ you should it is pivotal to this experience.

Steps:
1) Build you database,
2) setup your tables and relations,
3) setup the server explorer in VS,
4) add the project data source (using Entity),
5) Imports;

VB
Imports System.Data.Objects
Imports System.Data.Objects.DataClasses
Imports <your program namespace>.<your entity name>


6) create the instance of your entity container

VB
Dim model As New DM_dbEntities
'you are now connected to your database


Add a new record:
VB
model.Records.AddObject(New Record With {<the fields initialized here>})
'or
Dim rec As Record = Record.CreateRecord(<int id>)
'fill in the fields
model.Records.AddObject(rec)
model.SaveChanges(<save option>)


That's it for the setup. Feel free to make comments or suggestions!
The only constant is change... - Isaac Asimov


modified 26-May-12 20:26pm.

GeneralRe: Entity Framework Pin
Richard MacCutchan25-May-12 22:57
mveRichard MacCutchan25-May-12 22:57 
GeneralRe: Entity Framework Pin
Idle_Force26-May-12 9:17
Idle_Force26-May-12 9:17 
GeneralRe: Entity Framework Pin
Richard MacCutchan26-May-12 21:20
mveRichard MacCutchan26-May-12 21:20 
GeneralRe: Entity Framework Pin
Idle_Force27-May-12 3:08
Idle_Force27-May-12 3:08 
GeneralRe: Entity Framework Pin
Richard MacCutchan29-May-12 8:22
mveRichard MacCutchan29-May-12 8:22 
GeneralRe: Entity Framework Pin
Idle_Force30-May-12 19:29
Idle_Force30-May-12 19:29 
GeneralRe: Entity Framework Pin
Richard MacCutchan30-May-12 21:51
mveRichard MacCutchan30-May-12 21:51 
GeneralRe: Entity Framework Pin
Pete O'Hanlon29-May-12 0:48
mvePete O'Hanlon29-May-12 0:48 
GeneralRe: Entity Framework Pin
Idle_Force29-May-12 10:16
Idle_Force29-May-12 10:16 
GeneralRe: Entity Framework Pin
Pete O'Hanlon29-May-12 10:22
mvePete O'Hanlon29-May-12 10:22 
GeneralRe: Entity Framework Pin
Idle_Force29-May-12 14:35
Idle_Force29-May-12 14:35 
GeneralRe: Entity Framework Pin
Pete O'Hanlon29-May-12 22:03
mvePete O'Hanlon29-May-12 22:03 
Questionprocedure Pin
nitish_0724-May-12 18:14
nitish_0724-May-12 18:14 
AnswerRe: procedure Pin
Richard MacCutchan24-May-12 22:20
mveRichard MacCutchan24-May-12 22:20 
AnswerRe: procedure Pin
Pete O'Hanlon24-May-12 22:26
mvePete O'Hanlon24-May-12 22:26 
GeneralRe: procedure Pin
nitish_0724-May-12 23:18
nitish_0724-May-12 23:18 
GeneralRe: procedure Pin
Dave Kreskowiak25-May-12 1:16
mveDave Kreskowiak25-May-12 1:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.