public IHttpActionResult Post([FromBody] ODZUser oDZUser) { try { bool isLogged = CmsBL.Login(oDZUser); if (isLogged) { return(Created("user", oDZUser)); } else { return(StatusCode(HttpStatusCode.InternalServerError)); } } catch (CmsExceptions ex) { throw ex; } }
public IHttpActionResult Post([FromBody] Case issue) { try { bool isCaseCreate = CmsBL.AddCase(issue); if (isCaseCreate) { return(Ok("Registered successfully")); } else { return(StatusCode(HttpStatusCode.InternalServerError)); } } catch (CmsExceptions ex) { return(StatusCode(HttpStatusCode.InternalServerError)); } }