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)); }
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)); }
public async Task <IActionResult> CreateJRFLType([FromBody] JRFLType grfltype) { JRFLType type = await _srv.Insert(grfltype); return(Ok(type)); }
public async Task <IActionResult> GetJRFLType(string id) { JRFLType type = await _srv.GetById(id); return(Ok(type)); }