示例#1
0
        public async Task <ActionResult> CreateIconAsync(
            [FromBody] IconForm iconForm)
        {
            var nullValue = await _iconRepository.CreateIconAsync(iconForm.Name, iconForm.Url);

            return(Created("", null));
        }
示例#2
0
        public async Task <ActionResult> UpdateIconById(Guid iconId, [FromBody] IconForm iconForm)
        {
            var entity = await _iconRepository.GetIconEntityAsync(iconId);

            if (entity == null)
            {
                return(NotFound());
            }

            entity.Name = iconForm.Name;
            entity.Url  = iconForm.Url;

            await _iconRepository.UpdateIconAsync(entity);

            return(NoContent());
        }