예제 #1
0
 //post - הוספת דייר
 public IHttpActionResult Post([FromBody] Tenant t)
 {
     try
     {
         TenantBL.AddTenant(t);
         return(Ok());
     }
     catch
     {
         throw;
     }
 }
예제 #2
0
 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));
     }
 }