public Task CreateAsync(IllMake obj) { const string sql = "INSERT INTO illmakes (id, runId, userId, createdDate) VALUES (@id, @runId, @userId, @createdDate)"; return(ExecuteAsync(sql, obj)); }
public async Task <Unit> Handle(IllMakeCommand request, CancellationToken cancellationToken) { var model = new IllMake { Id = request.Id, RunId = request.RunId, UserId = request.UserId, CreatedDate = _clock.UtcNow() }; //todo: event await _repository.CreateAsync(model); return(Unit.Value); }