Absolutely! Each class generated by LINQ to SQL is tagged partial. This means that you can add to a class in a separate file if you name it correctly.
Generated File:
namespace MyApp
{
public partial class MyDataContext : System.Data.Linq.DataContext
{
}
}
Your file
namespace MyApp
{
public partial class MyDataContext
{
public string MyProperty { get; set; }
}
}
This works with the DataContext classes, the Table class and the stored procedure classes, etc.
source
share