Skip to content
Loading
0
  • 0
    I don't really understand. What does public Address address{get;set;} do?
    Here is what I have come up as a solution, I am expecting someone to tell me if it is a good way of doing that
    Here is the structure of the two table in my database
    table Employee
    EmployeeID int not null
    FirstName nchar(25) not null
    and so one
     
    Table Address
     AddressID int not null
    EmployeeID int not null
    Address nchar(50)
    City nchar(30)
    State nchar(20)
    Country nchar(30)
     
    Now I create a the employeeDetails class
    public int employeeid {get; set;}
    public int addressID {get; set;}
    public string FirstName {get; set;}
    public string LastName {get; set;}
    public string address {get; set;}
    public string City{get; set;}
    Public string State{get; set;}
    public String Country {get; set;}
     
    I have a procedure saying like this
     
    select
     employee.EmployeeId,
    employee.firstname,
    employee.lastname,
    address.address,
     address.city,
    address.state,
    address.country
    from employee
    right outer join
    address.employeeid on address.employeeid = employee.employeeid
     
    then I create a methode the method
     
    public employedetails getemployedetails
    where I call the store proc to return and the employee information and address information
     
    Thank you for your time
    0
  • 0
    Nobody has an idea?
    0