Ejemplo n.º 1
0
 // POST: api/CoachCurriculumDetails
 public IHttpActionResult Post([FromBody] coachCurriculumDetail value)
 {
     try
     {
         return(ResponseMessage(Request.CreateResponse(new
         {
             response = coachCurriculumDetailService.insertcoachCurriculumDetail(value)
         })));
     }
     catch (Exception e)
     {
         return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, e.ToString())));
     }
 }
Ejemplo n.º 2
0
 public string insertcoachCurriculumDetail(coachCurriculumDetail coachCurriculumDetail)
 {
     try
     {
         coachCurriculumDetail.available = true;
         context.coachCurriculumDetail.Add(coachCurriculumDetail);
         context.SaveChanges();
         return(CONSTANTES.CONSTANTES.ServiceResponse.ok);
     }
     catch (Exception e)
     {
         return(CONSTANTES.CONSTANTES.ServiceResponse.error);
     }
 }
Ejemplo n.º 3
0
 public string updatecoachCurriculumDetail(coachCurriculumDetail coachCurriculumDetail)
 {
     try
     {
         var result = context.coachCurriculumDetail.FirstOrDefault(x => x.id == coachCurriculumDetail.id);
         if (result != null)
         {
             result.title       = coachCurriculumDetail.title;
             result.description = coachCurriculumDetail.description;
             context.SaveChanges();
         }
         return(CONSTANTES.CONSTANTES.ServiceResponse.ok);
     }
     catch (Exception e)
     {
         return(CONSTANTES.CONSTANTES.ServiceResponse.error);
     }
 }
Ejemplo n.º 4
0
 public string updatecoachCurriculumDetail(coachCurriculumDetail coachCurriculumDetail)
 {
     return(coachCurriculumDetailRepository.updatecoachCurriculumDetail(coachCurriculumDetail));
 }
Ejemplo n.º 5
0
 public string insertcoachCurriculumDetail(coachCurriculumDetail coachCurriculumDetail)
 {
     return(coachCurriculumDetailRepository.insertcoachCurriculumDetail(coachCurriculumDetail));
 }