public async Task <Response <ViewModels.Task> > CreateAsync(ViewModels.Task task) { try { var result = await _taskRepository.CreateAsync(mapper.Map <DataAccess.Models.Task>(task)); return(new Response <ViewModels.Task>(mapper.Map <ViewModels.Task>(result))); } catch (Exception e) { return(new Response <ViewModels.Task>(e.InnerException.Message)); } }
public async System.Threading.Tasks.Task Update(ViewModels.Task task) { await _taskRepository.Update(mapper.Map <ViewModels.Task, DataAccess.Models.Task>(task)); }