Example #1
0
 public void InsertUser(User newUser)
 {
     User.Add(newUser);
 }
 private void InitializeUsers()
 {
                 var userDb = new User() {
         UserId = 1,
         Address = "Azize Šaćirbegović 1",
         CertId = 0,
         CityId = 1,
         CompanyId = 1,
         Dob = new DateTime(1980, 3, 31),
         Email = "",
         FacultyId = 0,
         FirstName = "Nerman",
         HighSchoolId = 0,
         Hobby = "",
         JobId = 1,
         LastName = "Deliahmetovic",
         PersonalSkills = "",
         PhoneNumber = "",
         TechId = 0
     }; 
     var userDbMatej = new User()
     {
         UserId = 2,
         Address = "Azize Šaćirbegović 1",
         CertId = 0,
         CityId = 1,
         CompanyId = 1,
         Dob = new DateTime(1985, 1, 1),
         Email = "",
         FacultyId = 0,
         FirstName = "Matej",
         HighSchoolId = 0,
         Hobby = "",
         JobId = 1,
         LastName = "Cica",
         PersonalSkills = "",
         PhoneNumber = "",
         TechId = 0
     }; 
     var userDbAnita = new User()
     {
         UserId = 3,
         Address = "Azize Šaćirbegović 1",
         CertId = 0,
         CityId = 1,
         CompanyId = 1,
         Dob = new DateTime(1985, 1, 1),
         Email = "",
         FacultyId = 0,
         FirstName = "Anita",
         HighSchoolId = 0,
         Hobby = "",
         JobId = 1,
         LastName = "Cinac",
         PersonalSkills = "",
         PhoneNumber = "",
         TechId = 0
     }; 
     var userDbErvin = new User()
     {
         UserId = 4,
         Address = "Azize Šaćirbegović 1",
         CertId = 0,
         CityId = 1,
         CompanyId = 1,
         Dob = new DateTime(1980, 3, 31),
         Email = "",
         FacultyId = 0,
         FirstName = "Ervin",
         HighSchoolId = 0,
         Hobby = "",
         JobId = 1,
         LastName = "Sikira",
         PersonalSkills = "",
         PhoneNumber = "",
         TechId = 0
     }; 
     var userDbZina = new User()
     {
         UserId = 5,
         Address = "Azize Šaćirbegović 1",
         CertId = 0,
         CityId = 1,
         CompanyId = 1,
         Dob = new DateTime(1980, 3, 31),
         Email = "",
         FacultyId = 0,
         FirstName = "Zinajda",
         HighSchoolId = 0,
         Hobby = "",
         JobId = 1,
         LastName = "Sarac",
         PersonalSkills = "",
         PhoneNumber = "",
         TechId = 0
     };
     var userRep = new UserRep();
     userRep.DeleteAll();
     userRep.InsertUser(userDbAnita);
     userRep.InsertUser(userDbErvin);
     userRep.InsertUser(userDbMatej);
     userRep.InsertUser(userDbZina);
     userRep.InsertUser(userDb);
 }