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(); } }
public SearchController() { unitOfWork = new UnitOfWork(); }
public PhotoController() { unitOfWork = new UnitOfWork(); }
public VoteController() { unitOfWork = new UnitOfWork(); }
public HomeController() { unitOfWork = new UnitOfWork(); }