This commit is contained in:
2020-12-23 16:19:50 +00:00
parent e5c811426b
commit c5c48a3de3
2 changed files with 3 additions and 1 deletions

View File

@@ -133,13 +133,14 @@ namespace AyaNova.Api.Controllers
return BadRequest(new ApiErrorResponse(ModelState));
}
var ret = await ct.NotifyEvent.AsNoTracking().Include(z => z.NotifySubscription).Select(z => new
var ret = await ct.NotifyEvent.AsNoTracking().Include(z => z.NotifySubscription).Include(z=>z.User).Select(z => new
{
z.Id,
z.Created,
z.EventDate,
DeliverAfter = (z.EventDate + z.NotifySubscription.AgeValue - z.NotifySubscription.AdvanceNotice),
z.UserId,
user=z.User.Name,
z.EventType,
z.AyaType,
z.Name

View File

@@ -58,6 +58,7 @@ namespace AyaNova.Models
//linked entity
public NotifySubscription NotifySubscription { get; set; }
public User User { get; set; }
}//eoc