Exemplo n.º 1
0
        public void CreateAbs(int userId, string justificatif, int absenceId)
        {
            using (var bickContext = new BicksContext())
            {
                AbsenceUser absenceUser = new AbsenceUser();
                absenceUser.UserId       = userId;
                absenceUser.Justificatif = justificatif;
                absenceUser.AbsenceId    = absenceId;

                bickContext.AbsenceUsers.Add(absenceUser);
                bickContext.SaveChanges();
            }
        }
Exemplo n.º 2
0
        public void CreateUser(string nom, string prenom, string usernname, string adresse, string password)
        {
            using (var bickContext = new BicksContext())
            {
                User user = new User();
                user.FirstName = nom;
                user.LastName  = prenom;
                user.Username  = usernname;
                user.Address   = adresse;
                user.Password  = password;

                bickContext.Users.Add(user);
                bickContext.SaveChanges();
            }
        }