Suppose I have a table in my database consisting of the following columns, 3 of which uniquely identify a row:
CREATE TABLE [dbo].[Lines]
(
[Attr1] [nvarchar](10) NOT NULL,
[Attr2] [nvarchar](10) NOT NULL,
[Attr3] [nvarchar](10) NOT NULL,
PRIMARY KEY (Attr1, Attr2, Attr3)
)
Now I have an object in my application that represents one of these lines. It contains three properties that correspond to the three Attr columns in the database.
public class Line
{
public Line(string attr1, string attr2, string attr3)
{
this.Attr1 = attr1;
this.Attr2 = attr2;
this.Attr3 = attr3;
}
public Attr1 {get; private set;}
public Attr2 {get; private set;}
public Attr3 {get; private set;}
}
The application has a second object that stores a collection of these line objects.
:. ( )? , , ? ... , - :
public GetLine(string attr1, string attr2, string attr3)
{
}
public UpdateLine(Line line)
{
}
, , , , , , , .
?