//post - הוספת דייר public IHttpActionResult Post([FromBody] Tenant t) { try { TenantBL.AddTenant(t); return(Ok()); } catch { throw; } }
public HttpResponseMessage Post(Tenant t) { try { //t.user_id = UserBL.AddUser(new User() { password = t.password, user_name = t.mail }); TenantBL.AddTenant(t); return(Request.CreateResponse(HttpStatusCode.OK, true)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.ExpectationFailed, ex)); } }