-1

I would like some of tables in my database to have standard columns such as createdBy, ModifiedBy, CreatedDateTime, modifiedDateTime etc.

So, I created an interface with those properties and implemented the interface in an abstract base class. I derived my concrete classes from this base class.

This is a brand new application using Code-First approach. When I create the database, the derived properties are ignored. The tables are created with just the properties in the derived classes.

I'm not sure why.

Thank you.

RT.
  • 435
  • 2
  • 9
  • 25

1 Answers1

0

I'm not sure exactly what was different, but tried it again with the following changes and it worked:

  1. gave dbCreator rights in the database for the user
  2. Changed the properties in my base class to be in the format (similar change for the other properties):

public string CreatedBy { get; set;}

RT.
  • 435
  • 2
  • 9
  • 25