public PeopleViewModel All() { PeopleViewModel model = new PeopleViewModel(); model.Persons = _memory.Read(); return(model); }
public PeopleViewModel All() { PeopleViewModel peopleViewModel = new PeopleViewModel(); peopleViewModel.AllPeople = pr.Read(); return(peopleViewModel); }
public PeopleViewModel All() { PeopleViewModel pvm = new PeopleViewModel(); pvm.PersonList = _peopleRepo.Read(); return(pvm); }
//IPeopleRepo peopleRepo = new InMemoryPeopleRepo(); //public Person Add(CreatePerson createPerson) //{ // Person person = new Person(); // person.FirstName = createPerson.FirstName; // person.LastName = createPerson.LastName; // person.InCityId = createPerson.CityId; // person.PhoneNumber = createPerson.PhoneNumber; // //person.ACityId = createPerson.CityId; // person = _personRepo.Create(createPerson); // return person; //} public PeopleViewModel All() { PeopleViewModel VM = new PeopleViewModel(); VM.PersonL = _personRepo.Read(); return(VM); }
public PeopleViewModel All() { PeopleViewModel peopleViewModel = new PeopleViewModel(); //InMemoryPeopleRepo pr = new InMemoryPeopleRepo(); peopleViewModel.AllPeople = pr.Read(); return(peopleViewModel); }
public PersonIndex All() { PersonIndex indexViewModel = new PersonIndex(); indexViewModel.PersonList = _peopleRepo.Read(); return(indexViewModel); }
public PeopleViewModel All() { PeopleViewModel vm = new PeopleViewModel(); vm.PeopleList = _peopleRepo.Read(); vm.CreatePersonViewModel.LiveInCity = _cityRepo.Read(); return(vm); }
public PersonViewModel All() { PersonViewModel PersonViewModel = new PersonViewModel(); PersonViewModel.PersonList = _peopleRepo.Read(); return(PersonViewModel); }
public PeopleViewModel All() { PeopleViewModel vm = new PeopleViewModel(); vm.PeopleList = _peopleRepo.Read(); vm.CreatePersonViewModel.CityList = _cityRepo.Read();//Alla citys i listan. return(vm); }
public PeopleViewModel All() { PeopleViewModel peopleViewModel = new PeopleViewModel(); //InMemoryPeopleRepo _caresRepo = new InMemoryPeopleRepo(); peopleViewModel.personList = _peopleRepo.Read(); ///peopleViewModel.personList return(peopleViewModel); }
public PeopleViewModel All() { PeopleViewModel vm = new PeopleViewModel();// there is loop for population and citygroup //but C# and razor can manage it but not Json converter, thats why // stuck in /api/react vm.PeopleList = _peopleRepo.Read(); vm.createPerson.CityList = _cityRepo.Read(); return(vm); }
public City Add(CreateCityViewModel createCityViewModel) { List <Person> personInCity = new List <Person>(); foreach (int personID in createCityViewModel.PeopleID) { Person person = _peopleRepo.Read(personID); personInCity.Add(person); } City city = _cityRepo.Create(personInCity, createCityViewModel.States, createCityViewModel.CityName); return(city); }
public City Add(CreateCityViewModel createCityViewModel) { /*if (_cityService.FindBy(createCityViewModel.cityList) == null) * { * return null; * }*/ List <Person> personInCity = new List <Person>(); foreach (int personID in createCityViewModel.PeopleID) { Person person = _peopleRepo.Read(personID); personInCity.Add(person); } //Person person = _peopleRepo.Read(createCityViewModel.PersonID); //City city = _cityRepo.Create(person, createCityViewModel.States, createCityViewModel.CityName); City city = _cityRepo.Create(personInCity, createCityViewModel.States, createCityViewModel.CityName); return(city); }
public List <People> All() { return(_peopleRepo.Read()); }