I\'m trying to seed some constants into my DB:
context.Stages.AddOrUpdate(s => s.Name,
new Stage()
In this line:
Span = new TimeSpan(1, 0, 0, 0)
You're using this constructor:
public TimeSpan(int days, int hours, int minutes, int seconds);
So you're actually creating a TimeSpan
greater than 24 hours since you're passing 1
to the days
parameter, while your underlying Database type is Time
which only accepts values between 00:00-23:59.
Hard to tell whether you actually meant to have a TimeSpan
with 1 day, or it's just a typo.
If you really want a TimeSpan
greater than 24 hours, i guess you'll have to map your field to another Database type (like SmallDateTime
).
If it's just a typo error, just change your line to:
Span = new TimeSpan(1, 0, 0),