This commit is contained in:
@@ -61,15 +61,20 @@ namespace AyaNova.Biz
|
||||
var EventItems = await q.ToArrayAsync();
|
||||
|
||||
//convert the Event array to the correct return type array
|
||||
var ret = EventItems.Select(m => new AyaNova.Api.Controllers.EventLogController.ObjectEventLogItem()
|
||||
using (var command = ct.Database.GetDbConnection().CreateCommand())
|
||||
{
|
||||
Date = m.Created,
|
||||
UserId = m.UserId,
|
||||
Event = m.AyEvent,
|
||||
Textra = m.Textra
|
||||
}).ToArray();
|
||||
ct.Database.OpenConnection();
|
||||
var ret = EventItems.Select(m => new AyaNova.Api.Controllers.EventLogController.ObjectEventLogItem()
|
||||
{
|
||||
Date = m.Created,
|
||||
UserId = m.UserId,
|
||||
Event = m.AyEvent,
|
||||
Textra = m.Textra,
|
||||
Name = BizObjectNameFetcherDirect.Name(AyaType.User, m.UserId, command)
|
||||
}).ToArray();
|
||||
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,18 +96,24 @@ namespace AyaNova.Biz
|
||||
|
||||
//Execute the query
|
||||
var EventItems = await q.ToArrayAsync();
|
||||
|
||||
//convert the Event array to the correct return type array
|
||||
var ret = EventItems.Select(m => new AyaNova.Api.Controllers.EventLogController.UserEventLogItem()
|
||||
using (var command = ct.Database.GetDbConnection().CreateCommand())
|
||||
{
|
||||
Date = m.Created,
|
||||
ObjectType = m.AyType,
|
||||
ObjectId = m.AyId,
|
||||
Event = m.AyEvent,
|
||||
Textra = m.Textra
|
||||
}).ToArray();
|
||||
ct.Database.OpenConnection();
|
||||
//convert the Event array to the correct return type array
|
||||
var ret = EventItems.Select(m => new AyaNova.Api.Controllers.EventLogController.UserEventLogItem()
|
||||
{
|
||||
|
||||
Date = m.Created,
|
||||
ObjectType = m.AyType,
|
||||
ObjectId = m.AyId,
|
||||
Event = m.AyEvent,
|
||||
Textra = m.Textra,
|
||||
Name = BizObjectNameFetcherDirect.Name(m.AyType, m.AyId, command)
|
||||
|
||||
}).ToArray();
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user