コード例 #1
0
 public IActionResult Save([FromBody] Member member)
 {
     try
     {
         var savedMember = _dal.CreateMember(member);
         return(savedMember != null
             ? (IActionResult)Created("Member Created", savedMember)
             : BadRequest("Data could not be saved"));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }