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); }
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); }