public static void TeardownClass()
        {
            ProfileRepository repo = new ProfileRepository();
            var result = repo.GetProfileByUserId("TestUserId");

            if (result != null)
            {
                repo.DeleteProfile(result.ProfileId);
            }

            result = repo.GetProfileByUserId("TestUserId2");

            if (result != null)
            {
                repo.DeleteProfile(result.ProfileId);
            }

            result = repo.GetProfileByUserId("TestUserIdDelete");

            if (result != null)
            {
                repo.DeleteProfile(result.ProfileId);
            }

            result = repo.GetProfileByUserId("TestUserIdSearch");

            if (result != null)
            {
                repo.DeleteProfile(result.ProfileId);
            }

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