Exemplo n.º 1
0
        public void Update(FreePass changedFreePass)
        {
            var freePass = context.FreePasses.Attach(changedFreePass);

            freePass.State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            context.SaveChanges();
        }
Exemplo n.º 2
0
        public void Delete(int id)
        {
            FreePass freePass = context.FreePasses.Find(id);

            if (freePass != null)
            {
                context.FreePasses.Remove(freePass);
                context.SaveChanges();
            }
        }
Exemplo n.º 3
0
 public void Add(FreePass freePass)
 {
     context.FreePasses.Add(freePass);
     context.SaveChanges();
 }