2

Is this possible? how?

As far as you know to mapping a class to db table we should be use TableAttribute(Name="tableName") attribute, so we can't use attributes on interfaces. If I don't use this attribute:

"The type 'interfaceName' is not mapped as a Table."

showed.

2
  • This is where EF4 knocks down L2SQL. You can map tables to abtract classes, and it fully supports inheritance. Entity Framework 4 FTW. Commented Sep 7, 2010 at 22:15
  • i think you're misunderstood my question! i want to map database tables to interfaces! no classes Commented Sep 7, 2010 at 22:29

1 Answer 1

3

This is not possible.

Refer to TableAttribute Class on MSDN.

TableAttribute - Designates a class as an entity class that is associated with a database table.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.