本文整理汇总了C#中UserService.Insert方法的典型用法代码示例。如果您正苦于以下问题:C# UserService.Insert方法的具体用法?C# UserService.Insert怎么用?C# UserService.Insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserService
的用法示例。
在下文中一共展示了UserService.Insert方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteAssigned
public void DeleteAssigned()
{
ProjectService service = new ProjectService();
Project project = (Project) CreateRecord();
Insert(project);
UserService userService = new UserService();
User manager = new User(UserRole.Manager, String.Format("project{0}User", project.ID), "asdf");
userService.Insert(manager);
service.Assign(project.ID, manager.ID);
service.Delete(project.ID);
Assert.AreEqual(0, service.GetByUser(manager.ID).Count);
userService.Delete(manager.ID);
}
示例2: TestFixtureSetUp
public override void TestFixtureSetUp()
{
UserService userService = new UserService();
_manager = new User(UserRole.Manager, "Name" + new Random().Next(), "asdf");
userService.Insert(_manager);
base.TestFixtureSetUp();
}
示例3: TestFixtureSetUp
public override void TestFixtureSetUp()
{
ProjectService projectService = new ProjectService();
_project = new Project("Name", "Description");
projectService.Insert(_project);
ModuleService moduleService = new ModuleService();
_module = new Module(_project.ID, "Name", "Description");
moduleService.Insert(_module);
UserService userService = new UserService();
_developer = new User(UserRole.Developer, Guid.NewGuid().ToString(), "asdf");
userService.Insert(_developer);
base.TestFixtureSetUp();
}