You can easily write your classes using Linq-to-SQL - you just need to draw your classes using some attributes.
For example, this is a very simple table that is in one of my projects, and it works fine with Linq-to-SQL:
[Table(Name = "Categories")]
public class Category : IDataErrorInfo
{
[Column(IsPrimaryKey = true, IsDbGenerated = true, AutoSync = AutoSync.OnInsert)]
public int Id { get; set; }
[Column] public string Name { get; set; }
[Column] public string ExtensionString { get; set; }
}
, ( ).
:
class CategoryRepository : ICategoryRepository
{
private Table<Category> categoryTable;
public CategoryRepository(string connectionString)
{
categoryTable = (new DataContext(connectionString)).GetTable<Category>();
}
}
, -, , , . , 100% , Linq-to-SQL.
Pro ASP.NET MVC Framework, .
, Linq-to-SQL , .