public static School castToDal(dtoSchool objToCast) { return(new School() { SchoolId = objToCast.SchoolId, SchoolName = objToCast.SchoolName, City = objToCast.City, Address = objToCast.Address, Telephon = objToCast.Telephon }); }
public HttpResponseMessage UpdateSchool(DTO.dtoSchool school) { try { BLL.Schools.UpdateSchool(school); return(Request.CreateResponse(HttpStatusCode.OK, true)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, ex.Message)); } }