views:

38

answers:

1

I have an employee class with as follows:

    public class Employee
{
    public string FirstName { get; set; }

    public string LastName { get; set; }

    public string UserName { get; set; }

    public string Password { get; set; }
}

The properties FirstName and LastName are stored in Employee table in Database1. UserName and Password are stored in User table in Database2. How can i map this class to these databases and what is the best practice to handle CURD operations in such scenarios?

A: 

I wouldn't, since Linq-to-SQL is one to one mapping -i.e. table to class, I would have the designer generate the two classes and just write a join when I wanted this data.

Chalkey