Notice that you have a new type extending DataContext that contains
properties for each data
table in the specified database (as well, notice that the GetPetName() stored procedure is repre-
sented by a public method of the same name). Before we program against these new types, let’s
examine this autogenerated code in a bit more detail.
Examining the Generated Entity Classes
As you can see, sqlmetal.exe defined a separate entity class for each table in the AutoLot database
(Inventory, Customers, Orders, CreditRisks), with each column encapsulated by a type property. In
addition, notice that each entity class implements two interfaces (INotifyPropertyChanging and
INotifyPropertyChanged), each of which defines a single event:
namespace System.Data.Linq
{
public interface INotifyPropertyChanging
{
Do'stlaringiz bilan baham: