Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when attribute has same name as entity #5

Open
xairrick opened this issue Jun 29, 2018 · 0 comments
Open

Issue when attribute has same name as entity #5

xairrick opened this issue Jun 29, 2018 · 0 comments

Comments

@xairrick
Copy link
Owner

mistake when generating classes.
Below I will give an example of the work of the standard mechanism of the utility.
[System.Runtime.Serialization.DataContractAttribute()]
[Microsoft.Xrm.Sdk.Client.EntityLogicalNameAttribute("new_bankgroup")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "8.0.1.7297")]
public partial class new_BankGroup : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
{

[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("new_bankgroup")]
public string new_BankGroup1 // correct
{
get
{
return this.GetAttributeValue("new_bankgroup");
}
set
{
this.OnPropertyChanging("new_BankGroup1");
this.SetAttributeValue("new_bankgroup", value);
this.OnPropertyChanged("new_BankGroup1");
}
}

}

And you template.

[System.Runtime.Serialization.DataContractAttribute()]
[Microsoft.Xrm.Sdk.Client.EntityLogicalNameAttribute("new_bankgroup")]
public partial class new_BankGroup : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
{
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("new_bankgroup")]
public string new_BankGroup // error name property == name class
{
get
{
return this.GetAttributeValue("new_bankgroup");
}
set
{
this.OnPropertyChanging("new_BankGroup");
this.SetAttributeValue("new_bankgroup", value);
this.OnPropertyChanged("new_BankGroup");
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant