Hello,
I have the following:
boxStat = new BoxStat {
BoxCount = database.Boxes. Count(),
SinceLastCreate = (DateTime.Now - database.Boxes. Max(b =>
b.CreatedAt)).D ays ?? 0
};
I am getting an error:
'System.Nullabl e<System.TimeSp an>' does not contain a definition for
'Days' and no extension method 'Days' accepting a first argument of
type 'System.Nullabl e<System.TimeSp an>' could be found (are you
missing a using directive or an assembly reference?)
I added ?? 0 to try to solve the problem but I keep having the same
error.
What am I doing wrong?
Thank You,
Miguel
I have the following:
boxStat = new BoxStat {
BoxCount = database.Boxes. Count(),
SinceLastCreate = (DateTime.Now - database.Boxes. Max(b =>
b.CreatedAt)).D ays ?? 0
};
I am getting an error:
'System.Nullabl e<System.TimeSp an>' does not contain a definition for
'Days' and no extension method 'Days' accepting a first argument of
type 'System.Nullabl e<System.TimeSp an>' could be found (are you
missing a using directive or an assembly reference?)
I added ?? 0 to try to solve the problem but I keep having the same
error.
What am I doing wrong?
Thank You,
Miguel
Comment