The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

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.