Пример #1
0
        public async Task <string> DeleteProjectAsync(int id)
        {
            var response = new ListModelResponse <SuiteViewModel>();

            var suitesDataModel = false;

            try
            {
                suitesDataModel = await _suiteRepository.DeleteSuite(id);

                if (suitesDataModel)
                {
                    // response.Message = String.Format("Record Deleted Successfully");
                    response.Message = Messages.DeletionSuccessMsg;
                }
                else
                {
                    //response.Message = String.Format("Record Deletion failed");
                    response.Message = Messages.DeletionFailMsg;
                }
            }
            catch (Exception ex)
            {
                response.DidError     = true;
                response.ErrorMessage = ex.Message;
            }

            return(response.Message);
        }