예제 #1
0
        public ActionResult <ResultVM <bool> > Delete(string bsonId)
        {
            ResultVM <bool> resultVM = new ResultVM <bool>();

            try
            {
                var result = projectBusiness.DeleteProject(bsonId);
                mapper.Map(result, resultVM);
                return(resultVM);
            }
            catch (Exception ex)
            {
                Common.LogMessage(ex.Message);
                resultVM.Message    = ex.Message;
                resultVM.StatusCode = Convert.ToInt32(Enums.StatusCode.BadRequest);
                return(StatusCode(StatusCodes.Status400BadRequest, new { Result = resultVM, Codes = new string[] { "ServerError" } }));
            }
        }
예제 #2
0
 public bool DeleteProject(ProjectModel project)
 {
     return(p1.DeleteProject(project));
 }
 // DELETE api/values/5
 public bool Delete(int id)
 {
     return(_projectBusiness.DeleteProject(id));
 }