public BasicMeasureUnitArg MapToArg(AddBasicMeasureUnit request) { return(new BasicMeasureUnitArg { Id = new Symbol(request.SymbolId), Title = request.Title, TitleSlug = request.TitleSlug }); }
public async Task <long> Handle(AddBasicMeasureUnit request, CancellationToken cancellationToken) { var dimension = await _measureDimensionRepository.GetById(request.MeasureDimensionId); dimension.DefineBasicMeasureUnit(_measureDimensionArgFactory.MapToArg(request)); await _measureDimensionRepository.Add(dimension, cancellationToken); return(dimension.Id); }
public Task <long> Post(long id, AddBasicMeasureUnit command) { command.MeasureDimensionId = id; return(_mediator.Send(command)); }