Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Is it a bad idea to use expose LINQ to SQL objects as data objects?

 

It exposes the presentation layer directly to the database, even if it is through a class, that class directly relates to the database fields, etc which is supposed to be bad, right?

 

If that is the case, then what use is LINQ to SQL doing the busy work of creating my business object classes for me?

 

Thoughts?

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

  • Administrators
Posted

I personally don't have too much of a problem with this - it makes your life easier as you do not have to create the object model yourself.

 

If the database is still fairly changeable though then you could encounter a lot of problems as schemas change and the Linq to Sql model needs to be kept in sync.

 

 

For anything more complex I would probably look at a more mature O/R mapper as this kind of problem is often addresses by the O/R mapper itself.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...