public void CreatePerson(PersonModel personModel) { var person = new Person(); person.Address = personModel.Address; person.Name = personModel.Name; person.Nit = personModel.Nit; person.AddressLatitude = personModel.AddressLatitude; person.AddressLongitude = personModel.AddressLongitude; person.CreatedDate = DateTime.UtcNow; person.PhoneNumber = personModel.PhoneNumber; FastFoodDbEntitiesInstance.Persons.Add(person); FastFoodDbEntitiesInstance.SaveChanges(); }
public ActionResult Create(PersonModel personModel) { PersonData.CreatePerson(personModel); return View(); }