Example #1
0
        public async Task <ActionResult <ServiceResponse <TEntity> > > DeleteAsync(Key id)
        {
            try
            {
                if (id == null)
                {
                    return(GenerateResponse(null, await PDKBusinessLogic.RemoveAsync(id)));
                }

                return(GenerateExceptionResponse(new Exception("Model is null!"), "Exception!"));
            }
            catch (Exception e)
            {
                return(GenerateExceptionResponse(e, "Exception!"));
            }
        }