public void TestMethod1() { // // TODO: Add test logic here // UnitOfWork unitOfWork = new UnitOfWork(); IRoleRepository repository = RepositoryFactory.GetRepository<IRoleRepository, Role>(unitOfWork); Role roleinstance = new Role(); /* IList<Role> role = repository.FindAll(); roleinstance.Name = "f**k yx1"; roleinstance.AddDate = (DateTime?)DateTime.Now; roleinstance.Description = "this is the description"; roleinstance.Status = RoleStatus.Normal; repository.Add(roleinstance); unitOfWork.Commit(); */ roleinstance = repository.FindBy(5); roleinstance.Name = "helo pussy"; repository[roleinstance.Key] = roleinstance; unitOfWork.Commit(); Console.Read(); }
Role CreateRole() { Role role = new Role(); return(role); }