private static BankNotifyDTO GenerateBankNotifyDTOFromModel(BankNotifyModel model) { var bankNotifyDTO = new BankNotifyDTO { Id = model.Id, IsReaded = model.IsReaded, BankName = model.BankName, DateTimeCreated = model.DateTimeCreated, NotifyDescription = model.NotifyDescription }; return(bankNotifyDTO); }
private static BankNotifyModel GenerateBankNotifyModelFromDTO(BankNotifyDTO dto) { var model = new BankNotifyModel(dto.Id, dto.BankName, dto.NotifyDescription, dto.DateTimeCreated, dto.IsReaded); return(model); }
public async Task <int> UpdateBankNotifyAsync(BankNotifyModel model) { return(await _dataService.UpdateBankNotifyAsync(GenerateBankNotifyDTOFromModel(model))); }
public async Task <BankNotifyModel> CreateBankNotifyAsync(BankNotifyModel model) { var newDTO = await _dataService.CreateBankNotifyAsync(GenerateBankNotifyDTOFromModel(model)); return(GenerateBankNotifyModelFromDTO(newDTO)); }
private BankNotifyItemViewModel GenerateBankNotifyItemViewModelFromModel(BankNotifyModel model) { return(new BankNotifyItemViewModel(_notifyService, model.Id, model.DateTimeCreated, model.IsReaded, model.BankName, model.NotifyDescription)); }