This commit is contained in:
2021-05-25 20:14:44 +00:00
parent 4f88042fdf
commit 8c0262cf86

View File

@@ -13,7 +13,7 @@ using Newtonsoft.Json;
namespace AyaNova.Biz
{
internal class TaskGroupBiz : BizObject, IJobObject, ISearchAbleObject, IReportAbleObject, IExportAbleObject, IImportAbleObject
{
@@ -46,7 +46,7 @@ namespace AyaNova.Biz
//
internal async Task<TaskGroup> CreateAsync(TaskGroup newObject)
{
await ValidateAsync(newObject, null);
if (HasErrors)
return null;
@@ -104,7 +104,7 @@ namespace AyaNova.Biz
//
internal async Task<TaskGroup> GetAsync(long id, bool logTheGetEvent = true)
{
var ret = await ct.TaskGroup.AsNoTracking().Include(z => z.Items).SingleOrDefaultAsync(m => m.Id == id);
var ret = await ct.TaskGroup.AsNoTracking().Include(z => z.Items.OrderBy(item => item.Sequence)).SingleOrDefaultAsync(m => m.Id == id);
if (logTheGetEvent && ret != null)
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, id, BizType, AyaEvent.Retrieved), ct);