Ejemplo n.º 1
0
        public async Task <IActionResult> UpdateJRFLType([FromBody] JRFLType grfltype, string id)
        {
            JRFLType original = await _srv.GetById(id);

            // To do change vales befor update
            // example original.name = grfltype.name;
            JRFLType type = await _srv.Update(id, grfltype);

            return(Ok(type));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> DeleteJRFLType(string id)
        {
            JRFLType original = await _srv.GetById(id);

            if (original == null)
            {
                return(BadRequest());
            }
            bool success = await _srv.Delete(original);

            return(Ok(success));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> CreateJRFLType([FromBody] JRFLType grfltype)
        {
            JRFLType type = await _srv.Insert(grfltype);

            return(Ok(type));
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> GetJRFLType(string id)
        {
            JRFLType type = await _srv.GetById(id);

            return(Ok(type));
        }