DebbyWithaYRIPHEATHY
New Member
I have an issue with my method that updates the database with user information. during HttpGet it uses a view model to ensure the integrity of the data, and in HttpPost, the data is passed back and is there. (ran some checks with breakpoints and everything was holding the correct user data that they should have been)However, when I run my .Save() method, this information is not stored into the DB.I've checked to see if its pointing to the correct database by changing the data manually, it comes up in a list view just fine. I'M missing something, just can't figure out what ><Below is the code there is form data in all of the relevant view models, but it just doesn't save!\[code\] [HttpPost] public ActionResult HouseCreate(CreateHouseViewModel viewModel) { if (ModelState.IsValid) { var house = new House(); house.address = viewModel.address; house.postCode = viewModel.postCode; house.noOfDisputes = viewModel.noOfDisputes; _db.Save(); return RedirectToAction("House"); } return View(viewModel); }\[/code\]house is an object of my house database, modelled correctly with correct Primary keys in place (double checked this in the database viewer.)save calls: \[code\]void DataSources.Save() { SaveChanges(); }\[/code\]No errors come up, which makes it even worse.