Exemplo n.º 1
0
 public static Group castToDal(dtoGroup objToCast)
 {
     return(new Group()
     {
         code = objToCast.code,
         SchoolId = objToCast.SchoolId,
         grade1 = objToCast.grade1,
         grade2 = objToCast.grade2,
         TreatmentType = objToCast.TreatmentType,
         GroupName = objToCast.GroupName
     });
 }
 public HttpResponseMessage AddGroup(DTO.dtoGroup Group)
 {
     try
     {
         BLL.Groups.AddGroup(Group);
         return(Request.CreateResponse(HttpStatusCode.OK, true));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.NotFound, ex.Message));
     }
 }