Example #1
0
        public async Task <IActionResult> AddColony(ColonyDto dto)
        {
            var result = await Mediator.Send(new AddColonyCommand()
            {
                ColonyDto = dto
            });

            return(Ok(result));
        }
Example #2
0
        public async Task <IActionResult> EditColonyCommand(ColonyDto dto)
        {
            var result = await Mediator.Send(new AddColonyCommand()
            {
                ColonyDto = dto
            });

            if (result == Guid.Empty)
            {
                return(NotFound());
            }
            return(Ok(result));
        }