예제 #1
0
 public ManagerCallVM(ManagerCall m)
 {
     Id       = m.Id;
     IsActive = m.IsActive;
     CallTime = m.CallTime;
     Comment  = m.Comment;
     OrderId  = m.OrderId.Value;
     if (m.Order != null && m.Order.Table != null)
     {
         TableNumber = m.Order.Table.Number;
     }
 }
예제 #2
0
        public async Task <ManagerCallVM> CreateNewManagerCall(ManagerCallVM vm)
        {
            var dbCall = new ManagerCall
            {
                IsActive = vm.IsActive,
                Comment  = vm.Comment,
                CallTime = vm.CallTime,
                OrderId  = vm.OrderId
            };
            var newCall = await _db.ManagerCalls.CreateAsync(dbCall);

            var ret = new ManagerCallVM(newCall);

            return(ret);
        }