Exemplo n.º 1
0
 public void Configuration(IAppBuilder app)
 {
     // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=316888
     using (AdvertisementDatabase adDB = new AdvertisementDatabase()) {
         AdvertisementSearch.AddUpdateLuceneIndex(adDB.Advertisements.ToList());
         UserSearch.AddUpdateLuceneIndex(adDB.Users.ToList());
         UserProfileSearch.AddUpdateLuceneIndex(adDB.UserProfiles.ToList());
     }
 }
Exemplo n.º 2
0
        //[ValidateAntiForgeryToken]
        public void Edit(EditProfileViewModel model)
        {
            if (!Security.IsAuthenticated || !ModelState.IsValid)
            {
                ResponseData.WriteFalse(Response);
                return;
            }
            var result = new List <UserProfile> {
                Profiles.Update(model)
            };

            UserProfileSearch.AddUpdateLuceneIndex(result);
            ResponseData.WriteTrue(Response);
        }