public new BllEvent Update(BllEvent entity) { AttributeLibService attributeLibService = new AttributeLibService(uow); StatusLibService statusLibService = new StatusLibService(uow); UserLibService userLibService = new UserLibService(uow); FilepathLibService filepathLibService = new FilepathLibService(uow); attributeLibService.Update(entity.AttributeLib); statusLibService.Update(entity.StatusLib); userLibService.Update(entity.RecieverLib); filepathLibService.Update(entity.FilepathLib); uow.Events.Update(mapper.MapToDal(entity)); uow.Commit(); return(mapper.MapToBll(uow.Events.Get(entity.Id))); }
public new BllEvent Create(BllEvent entity) { AttributeLibService attributeLibService = new AttributeLibService(uow); StatusLibService statusLibService = new StatusLibService(uow); UserLibService userLibService = new UserLibService(uow); FilepathLibService filepathLibService = new FilepathLibService(uow); entity.StatusLib = statusLibService.Create(entity.StatusLib); entity.RecieverLib = userLibService.Create(entity.RecieverLib); entity.AttributeLib = attributeLibService.Create(entity.AttributeLib); entity.FilepathLib = filepathLibService.Create(entity.FilepathLib); var ormEntity = uow.Events.CreateAndReturnOrm(mapper.MapToDal(entity)); uow.Commit(); entity.Date = ormEntity.date; entity.Id = ormEntity.id; return(entity); }