Esempio n. 1
0
        public async Task <ActionResult> Delete(Guid id)
        {
            try
            {
                var result = rightRepo.Retrieve().FirstOrDefault(x => x.RightID == id);
                if (result == null)
                {
                    return(NotFound());
                }

                await rightRepo.DeleteAsync(id);

                return(NoContent());
            }
            catch (Exception)
            {
                return(BadRequest());
            }
        }