'Getting these two errors when I delete a project and system.DateTime error
Solution 1:[1]
I need more information on the first error, it looks like you're deleting something that is referenced to another table so it will have a foreign key constraint. The references of the item you are deleting will need to be removed from the other tables first.
2nd issue you need to a System.DateTime to a string, so you can do:
db.Entry(hR).Entity.ModifiedDate = LoginInfo.CurrentDate().ToString();
a better way of doing date time:
DateTime localDateTime = DateTime.Now; - local time
DateTime utcDateTime = DateTime.UtcNow; - utc time
Then add your ToString();
You can also format DateTime depending on what you are after: DateTime
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | JuanR |


