示例#1
0
 public StatusEvento CreateStatus(StatusEvento model)
 {
     using (var db = new SistemaDeEventosContext())
     {
         db.StatusEventos.Add(model);
         db.SaveChanges();
         return(model);
     }
 }
示例#2
0
        public bool Excluir(StatusEvento model)
        {
            using (var db = new SistemaDeEventosContext())
            {
                db.Entry(model).State = EntityState.Deleted;

                db.SaveChanges();

                return(true);
            }
        }
示例#3
0
        public StatusEvento Update(StatusEvento model)
        {
            using (var db = new SistemaDeEventosContext())
            {
                db.Entry(model).State = EntityState.Modified;

                db.SaveChanges();

                return(model);
            }
        }