public Alert Add(Alert alert) { Alert ret = context.Add <Alert>(alert).Entity; context.SaveChanges(); return(ret); }
public User Add(User user) { User ret = context.Add <User>(user).Entity; context.SaveChanges(); return(ret); }
public Users Save(Users user) { var state = user.UserId == 0 ? EntityState.Added : EntityState.Modified; _context.Entry(user).State = state; _context.Add(user); _context.SaveChanges(); return(user); }
public Infra.Entidades.Environment Save(Infra.Entidades.Environment item) { var state = item.EnvironmentId == 0 ? EntityState.Added : EntityState.Modified; _context.Entry(item).State = state; _context.Add(item); _context.SaveChanges(); return(item); }
public Logs Save(Logs item) { var state = item.ErrorOccurrenceId == 0 ? EntityState.Added : EntityState.Modified; _context.Entry(item).State = state; _context.Add(item); _context.SaveChanges(); return(item); }
public Level Save(Level item) { var state = item.LevelId == 0 ? EntityState.Added : EntityState.Modified; _context.Entry(item).State = state; _context.Add(item); _context.SaveChanges(); return(item); }
public Error Save(Error item) { var state = item.ErrorId == 0 ? EntityState.Added : EntityState.Modified; _context.Entry(item).State = state; _context.Add(item); _context.SaveChanges(); return(item); }