EF CodeFirst: Rails-style created and modified columns
Using Entity Framework CodeFirst, how do I create a created datetime column that gets populated with the current timestamp everytime a record is inserted for that table, and a modified datetime column that has a timestamp generated evertime a row is updated? Rails does this by default and I was hoping the EF generated database would have this as well, but it doesn't. Is this something that can be done with data annotations? If so, how? Thanks! Ladislav Mrnka It is not supported in EF. EF will not create these columns for you automatically. You must do it yourselves by either: Have Created and