public void Update(int id, Pratos entity)
 {
     prat                 = this.GetById(id);
     prat.nomePrato       = entity.nomePrato;
     prat.valorPrato      = entity.valorPrato;
     prat.idRestaurante   = entity.idRestaurante;
     db.Entry(prat).State = System.Data.Entity.EntityState.Modified;
     db.SaveChanges();
 }
 public void Delete(Pratos entity)
 {
     db.Pratos.Remove(entity);
     db.SaveChanges();
 }
 public void Create(Pratos entity)
 {
     db.Pratos.Add(entity);
     db.SaveChanges();
 }