Exemplo n.º 1
0
 // POST: api/T_Designs
 public Responses Post([FromBody] T_DesignViewModel entity)
 {
     //Responses result = new Responses();
     //if (ModelState.IsValid)
     //{
     return(T_DesignRepo.Update(entity));
     //}
     //else
     //{
     //    result.Success = false;
     //}
     //return result;
 }
Exemplo n.º 2
0
        // PUT: api/T_Designs/5
        public Responses Put(int id, [FromBody] T_DesignViewModel entity)
        {
            entity.Id = id;
            Responses result = new Responses();

            if (ModelState.IsValid)
            {
                result = T_DesignRepo.Update(entity);
            }
            else
            {
                result.Success = false;
            }
            return(result);
        }