public async Task <string> Handle(MaterialCreateRequest request, CancellationToken cancellationToken) { Guid newUserId = Guid.NewGuid(); await _storage.AddAsync(new Material(newUserId, request.Name, request.Spec, request.Manufact, request.Area, request.CreateTime)); return(newUserId.ToString()); }
public async Task HandleAsync(CreateMaterialCommand command) { await _storage.AddAsync( new Material(command.Id, command.Name, command.Spec, command.Manufact, command.Area, command.CreateUser)); }