Beispiel #1
0
        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));
        }
Beispiel #2
0
        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));
        }
Beispiel #4
0
 Task OnAddResource(AddResourceCommand cmd)
 {
     return(AddFragment($"+{cmd.Count} {cmd.Kind}"));
 }
        public async Task <IActionResult> AddResource(AddResourceCommand command)
        {
            await _resourceService.AddResource(command);

            return(Ok());
        }
Beispiel #6
0
 public ResourceRoot(AddResourceCommand cmd)
 {
     this.Name         = cmd.Name;
     this.Amount       = cmd.Amount;
     this.Observations = cmd.Observations;
 }