public async Task <DomainResource?> AddNewResource(AddResourceCommand r) { var resource = await _resources.CreateNewResource(r.DisplayName, r.MetaData, r.Description, r.ResourceTypeName); return(_mapper.Map <DomainResource>(resource)); }
public async Task <IActionResult> OnGetAsync(Guid?id) { Command = new AddResourceCommand { GroupId = id }; ReturnUrl = Request.Headers["Referer"].ToString(); return(Page()); }
public async Task <long> AddResource(AddResourceCommand command) { var resource = new Resource(command.Specification, Guid.NewGuid(), command.InstalationKey, command.DateOfPurchase, command.LocalizationId, command.UserId, command.Type); return(await _resourcesRepository.AddResource(resource)); }
Task OnAddResource(AddResourceCommand cmd) { return(AddFragment($"+{cmd.Count} {cmd.Kind}")); }
public async Task <IActionResult> AddResource(AddResourceCommand command) { await _resourceService.AddResource(command); return(Ok()); }
public ResourceRoot(AddResourceCommand cmd) { this.Name = cmd.Name; this.Amount = cmd.Amount; this.Observations = cmd.Observations; }