Linq to Sql – How-to Separate the entities and the DataContext.(daniel.wertheim.se)

submitted by sedanwersedanwer(216) 2 years, 2 months ago

Yesterday we started to use Linq to Sql in a project at work. We didn’t select NHibernate but kind of wanted a clean model anyway, where the entities are separated and not bundled in the same class as the context. We also wanted clean entities: No partial methods; No (by us) unused INotify-interfaces. We also wanted the DataContext to live in an own assembly, so it’s not included in the assembly that holds the entities. Ok, so whith al these demands you probably think that NHibernate would be a better choice, well it wasn’t that hard to accomplish a solution that fullfilled our needs, and that’s what this post is about.

add a comment |category: |Views: 53

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story