public static void SetupClass(TestContext testContext)
        {
            ProfileRepository repo = new ProfileRepository();

            Profile profile = new Profile
            {
                UserId = "TestUserIdDelete",
            };

            repo.SaveProfile(profile);

            profile = new Profile
            {
                UserId = "TestUserIdSearch",
            };

            repo.SaveProfile(profile);
        }
示例#2
0
 public async Task<ActionResult> Create()
 {
     string userId = User.Identity.GetUserId();
     ProfileRepository repo = new ProfileRepository();
     Profile newProfile = new Profile
     {
         UserId = User.Identity.GetUserId()
     };
     newProfile = repo.SaveProfile(newProfile);
     //Profile profile = new Profile { UserId = User.Identity.GetUserId() };
     return View(newProfile);
 }