LINQ to SQL mapping without using attributes or external XML configuration
I'm trying to set up LINQ to SQL over an existing domain object, so I can simplify caller access to my repositories. I don't want to add attr开发者_如何学Goibutes all over my domain object's class, and I don't want to have to maintain an external XML mapping file (even with tools like SQLMetal). I would prefer to define the mapping in code, similar to how Fluent NHibernate works. Is this possible, and how can it be achieved?
This isn't possible with LINQ to SQL. It is possible in the Entity Framework.
精彩评论