Rebecca Scott
Rebecca Scott

Reputation: 2431

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 attributes 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?

Upvotes: 1

Views: 461

Answers (1)

Mark Cidade
Mark Cidade

Reputation: 99957

This isn't possible with LINQ to SQL. It is possible in the Entity Framework.

Upvotes: 1

Related Questions