Пример #1
0
 public IActionResult Update([FromBody] Receitas receitas, [FromServices] ReceitasService service)
 {
     if (ModelState.IsValid)
     {
         return(Ok(service.UpdateReceita(receitas)));
     }
     else
     {
         return(BadRequest(ModelState));
     }
 }
Пример #2
0
 public IActionResult Delete(Guid idReceita, [FromServices] ReceitasService service)
 {
     return(Ok(service.DeleteReceitaById(idReceita)));
 }
Пример #3
0
 public IActionResult GetAll(Guid idUsuario, [FromServices] ReceitasService service)
 {
     return(Ok(service.GetMinhasReceitas(idUsuario)));
 }
Пример #4
0
 public IActionResult GeReceitatById(Guid idReceita, [FromServices] ReceitasService service)
 {
     return(Ok(service.GetReceitasByIdClass(idReceita)));
 }
Пример #5
0
 public IActionResult GetAll([FromServices] ReceitasService service)
 {
     return(Ok(service.GetAllReceitas()));
 }