public async Task EditAsyncTask(ActivityTaskModel model) { var task = await _repository.GetAsyncTask(model.Id); ActivitiesFactory.CreateTask(model, task, _userId); _repository.EditAsyncTask(task); await _unitOfWork.SaveChangesAsync(); }
public async Task AddAsyncTask(ActivityTaskModel model) { await _repository.AddTaskAsync(ActivitiesFactory.CreateTask(model, _userId)); await _unitOfWork.SaveChangesAsync(); }