Example #1
0
        public async Task <IActionResult> DeleteDomain([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var domain = await _domainRepository.GetDomain(id);

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

            await _domainRepository.DeleteDomain(id);

            return(Ok());
        }
Example #2
0
 public Domain DeleteDomain(string id)
 {
     return(_repo.DeleteDomain(id));
 }