public void AddUsersValues(int Min, int Max) { BDContext db = new BDContext(); using (db) { UsersValue value = new UsersValue(); value.min = Min; value.max = Max; db.UsersValues.Add(value); db.SaveChanges(); } }
public int[,] ShowAllUsersValue() { BDContext db = new BDContext(); int[,] usersVal = new int[3, 2]; using (db) { UsersValue[] user = new UsersValue[5]; user = db.UsersValues.ToArray(); for (int i = 0; i < 3; i++) { usersVal[i, 0] = user[i].min; usersVal[i, 1] = user[i].max; } } return(usersVal); }