public void DeletePerson(int personId) { using (var actions = new PersonActions()) { actions.DeletePerson(personId); } }
public int SavePerson(Contoso.Apps.Insurance.Data.DTOs.Person person) { using (var actions = new PersonActions()) { var personModel = PersonMapping.MapDtoToEntity(person); actions.SavePerson(personModel); person.Id = personModel.Id; } return(person.Id); }
public int SavePerson(Data.DTOs.Person person) { using (var actions = new PersonActions(_connectionString)) { var personModel = PersonMapping.MapDtoToEntity(person); actions.SavePerson(personModel); person.Id = personModel.Id; } return(person.Id); }
public IList <Contoso.Apps.Insurance.Data.DTOs.Person> GetPeopleWhoAreNotPolicyHolders() { List <Contoso.Apps.Insurance.Data.DTOs.Person> people; using (var actions = new PersonActions()) { people = actions.GetPeopleWhoAreNotPolicyHolders().Select(PersonMapping.MapEntityToDto).ToList(); } return(people); }
// GET api/people public IList <Data.DTOs.Person> GetAllPeople(bool getPeopleWhoAreNotPolicyHolders = false) { List <Data.DTOs.Person> people; using (var actions = new PersonActions(_connectionString)) { people = getPeopleWhoAreNotPolicyHolders ? actions.GetPeopleWhoAreNotPolicyHolders().Select(PersonMapping.MapEntityToDto).ToList() : actions.GetAllPeople().ToList().Select(PersonMapping.MapEntityToDto).ToList(); } return(people); }
public static void Main(string[] args) { // This is the result from the first task PrimitveType.OperationsOnBoolean(); // This is the result from the second task PersonActions personActions = new PersonActions(); personActions.MakePerson(23); personActions.MakePerson(32); // The result from the third task cannot be included // in this solution but the code can, so you can find // it in the solution explorer. // Important! If you have JS Lint installed the project // may not run due to JSLind validation errors. // Go to TOOLS > JS Lint Options... > uncheck // Cancel build on error // This is the result from the fourth task MinesGame.Engine(); }