예제 #1
0
 static void Main(string[] args)
 {
     using (var uow = new UnitOfWork())
     {
         var user = new User("Marusya", "*****@*****.**", "PASS :D ", DateTime.Parse("27.04.1983"));
         uow.UserRepository.Create(user);
         uow.Save();
         user.Password = "******";
         uow.UserRepository.Update(user);
         uow.Save();
         Console.WriteLine((uow.UserRepository.Read(a => a.Login == "Marusya").ToList()[0]).ToString());
         uow.UserRepository.Delete(2);
         uow.Save();
     }
 }
예제 #2
0
 public SearchController()
 {
     unitOfWork = new UnitOfWork();
 }
 public PhotoController()
 {
     unitOfWork = new UnitOfWork();
 }
예제 #4
0
 public VoteController()
 {
     unitOfWork = new UnitOfWork();
 }
 public HomeController()
 {
     unitOfWork = new UnitOfWork();
 }