aigvzgpsze
New Member
I have the following database tables to work with and i am sort of new to oop so i thought i'd ask here.\[code\]assignment----------idperson_idassigned_address_idposition_idperson----------person_idcurrent_address_idnamessndrivers_licenseaddress---------idaddress_numberaddress_streetaddress_cityaddress_state address_zipposition---------iddescriptionrate\[/code\]I have created the following classes\[code\]Person Classint? idAddress currentAddressstring Namestring ssnstring drivers_licensePersonAssignment Classidperson_idAddress assignedAddressPosition assignedPosition Address Classstring address_numberstring address_streetstring address_citystring address_state int address_zip Position Classint? idstring descriptiondouble payment_rate\[/code\]I've also created Seprate Service Classes for each of the objects which access the Dal.Repository and perform crud methods on each of the objects.i.e.\[code\]PersonService ClassUpdate(Person p)Insert(Person p)GetListOfPeople()GetPerson()PersonAssignmentService ClassUpdate(PersonAssignment p)Insert(PersonAssignment p)GetListOfPeopleAssignments()GetAssignment()\[/code\]I also have Repositories for Each of the Objectsi.e.\[code\]PersonRepository ClassUpdate(PersonAssignment p)Insert(PersonAssignment p)GetListOfPeopleAssignments()GetAssignment()\[/code\]On my webpage which contains both a persons assignment and the persons personal details i find myself calling PersonService and PersonAssignmentService.This just seems like a lot of work. Am i doing something wrong? Maybe there a more simple way to design something like this and i'm just not getting it.Thanks for any helpThanks