public async Task CreateAsync(TaskTransmission taskTransmission) { using (var connection = await OpenConnection()) { await connection.ExecuteAsync("INSERT INTO TaskTransmission (TaskReferenceId, TargetId, CreatedOn) VALUES (@TaskReferenceId, @TargetId, @CreatedOn)", taskTransmission); } }
public async Task <TaskTransmission> BizActionAsync(TaskTransmission inputData) { if (inputData.TaskReferenceId == Guid.Empty) { return(ReturnError <TaskTransmission>(BusinessErrors.FieldNullOrEmpty("TaskReferenceId"))); } if (inputData.CreatedOn == default) { return(ReturnError <TaskTransmission>(BusinessErrors.FieldNullOrEmpty("CreatedOn"))); } await _dbAccess.CreateAsync(inputData); return(inputData); }