masoud_sedighy@yahoo.com (11) [Avatar] Offline
#1
In listing 8.26 for the partial class Publisher, this method has been mentioned for win form.

partial void OnCreated()
{
this.ID = Guid.NewGuid();
this.Name = string.Empty();
this.WebSite = string.Empty();
}

I like to know how we can use this method for the detail view or grid view.


Best regards.
fabrice.marguerie (224) [Avatar] Offline
#2
Re: Oncreated() method in detail view or grid view
I don't get it.

You are talking about Listing 8.27, right?
Partial methods are in the Publisher entity class. This is not related in any way with Windows Forms. You can use them in any kind of project that is based on LINQ to SQL.
masoud_sedighy@yahoo.com (11) [Avatar] Offline
#3
Re: Oncreated() method in detail view or grid view
thanks, I was on a mistake. because I was thinking oncreated() method is for inserting default values in win forms.

Best regards.