Exemplo n.º 1
0
        public ActionResult <DostawcaEntity> DostawcaDelete(DostawcaEntity dostawca)
        {
            _context.Dostawcy.Remove(dostawca);
            var wynikZapisu = _context.SaveChanges();

            if (wynikZapisu > 0)
            {
                return(new OkResult());
            }
            return(new BadRequestResult());
        }
Exemplo n.º 2
0
        public ActionResult <DostawcaEntity> DostawcaSave(DostawcaEntity nowyDostawca)
        {
            _context.Dostawcy.Add(nowyDostawca);
            var wynikZapisu = _context.SaveChanges();

            if (wynikZapisu > 0)
            {
                return(new OkResult());
            }
            return(new BadRequestResult());
        }
 public ActionResult <DostawcaEntity> DeleteDostawca([FromBody] DostawcaEntity dostawca)
 {
     return(_dostawcaService.DostawcaDelete(dostawca));
 }
 public ActionResult <DostawcaEntity> EditDostawca([FromBody] DostawcaEntity dostawca)
 {
     return(_dostawcaService.DostawcaEdit(dostawca));
 }