Simple intro to Entity Framework without code generators?

Status
Not open for further replies.

BlackHex

Ars Tribunus Angusticlavius
9,638
Subscriptor++
I'm trying to get my head around Entity Framework and I'm going batty... I just can't find any information onhow to use it without all the VS auto generation of code.

I'm trying to build a simple layered access:

POCO
EF
SQL-CE

But I can't for the life of me figure out how to map POCO's to my existing SQL-CE data connection (SqlCeConnection). All the tutorials start blathering on about csdl, msdl,... yada yada which seem to be the output of some tools...

Can anyone give me any good links to work from before I completely abandon this system?
thanks
 

Xavin

Ars Legatus Legionis
30,828
Subscriptor++
I haven't used Entity Framework, but if it's like Linq to SQL, then there's not any reasonable way to use it without the code gen. Even if there was, I'm not really sure why you would want to, a lot of what you are getting is not having to deal with writing all of the boilerplate object code.

If you want to do it all by hand you can always use NHibernate, which will even go so far as to auto-generate the db end from the objects if you want that.
 

BlackHex

Ars Tribunus Angusticlavius
9,638
Subscriptor++
I want to do it without code gen as a learning excersise. Over the years I have developed an immense distrust of technologies that require code-gen type attributes. If it can't be done by hand (even if it is tedious) then I strongly question the value of the solution.

Once I can understand it, use it, and make progress by hand then I'm ok with handing over to code-gen, but not before.
 

technophile

Ars Legatus Legionis
23,768
BlackHex":24ifa2et said:
I want to do it without code gen as a learning excersise. Over the years I have developed an immense distrust of technologies that require code-gen type attributes. If it can't be done by hand (even if it is tedious) then I strongly question the value of the solution.

Once I can understand it, use it, and make progress by hand then I'm ok with handing over to code-gen, but not before.
I would suggest doing the code gen and then just reviewing the .edmx and .cs files it generates until you understand what's going on. They're pretty straightforward for most usages; you certainly could do it by hand if you had no objection to wasting massive amounts of time. :p
 
Status
Not open for further replies.