﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Issues  » Member name conflict with Type name.</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 06:59:30 GMT</lastBuildDate><ttl>20</ttl><item><title>Member name conflict with Type name.</title><link>http://forum.strataframe.net/FindPost1609.aspx</link><description>I am wrapping up my first project with Strataframe.&amp;nbsp; I am now remapping to the production database, and have discovered what appears to be a bug...&lt;/P&gt;&lt;P&gt;I have a SQL databse with a Table named: DealerType.&amp;nbsp; That table contains a column named: DealerType.&amp;nbsp; So the generated class wont compile because the Member name cannot be the same as the Containing Type name.&amp;nbsp; Here are some snippets of generated code:&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;namespace&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; DealerLocatorAdmin&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;partial&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;class&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;DealerType&lt;/FONT&gt;&lt;FONT size=2&gt; : MicroFour.StrataFrame.Business.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;BusinessLayer&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;{&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; DealerType&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;[&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Browsable&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;),&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;BusinessFieldDisplayInEditor&lt;/FONT&gt;&lt;FONT size=2&gt;(),&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Description&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"DealerType"&lt;/FONT&gt;&lt;FONT size=2&gt;),&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;DesignerSerializationVisibility&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;DesignerSerializationVisibility&lt;/FONT&gt;&lt;FONT size=2&gt;.Hidden)]&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; System.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; DealerType&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; (System.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.CurrentRow[&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"DealerType"&lt;/FONT&gt;&lt;FONT size=2&gt;];&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;set&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.CurrentRow[&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"DealerType"&lt;/FONT&gt;&lt;FONT size=2&gt;] = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;value&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Any ideas on how to work around this?&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Wed, 21 Jun 2006 10:53:55 GMT</pubDate><dc:creator>Jason Stevenson</dc:creator></item><item><title>RE: Member name conflict with Type name.</title><link>http://forum.strataframe.net/FindPost1616.aspx</link><description>Duh!&amp;nbsp; Thanks dude... I should have thought of renaming the BO...&lt;/P&gt;&lt;P&gt;Jason</description><pubDate>Wed, 21 Jun 2006 10:53:55 GMT</pubDate><dc:creator>Jason Stevenson</dc:creator></item><item><title>RE: Member name conflict with Type name.</title><link>http://forum.strataframe.net/FindPost1610.aspx</link><description>Jason,&lt;/P&gt;&lt;P&gt;The problem is with C# only.&amp;nbsp;&amp;nbsp; You cannot create a member that has the same name as the containing type because only the constructors are allowed to have the same name as the containing type.&amp;nbsp; What you'll need to do is:&lt;/P&gt;&lt;P&gt;1)&amp;nbsp;Copy the DealerType property from the .designer.cs file.&amp;nbsp; &lt;/P&gt;&lt;P&gt;2) Then go to the Business Object Mapper and customize the DealerType field on the business object.&amp;nbsp; &lt;/P&gt;&lt;P&gt;3) Choose the "Use Custom Code" option and paste the copied code into the "Custom Code" window at the bottom.&amp;nbsp;&lt;/P&gt;&lt;P&gt;4) Then, simply change the name of the property from "DealerType" to "DealerTypeName" or "DealerType2" or something that is unique from the name of the class.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Or, you could simply rename your business object from "DealerType" to "DealerTypeBO" or "DealerTypeBizObj" or something that will allow the object to continue to use the property name of DealerType.&lt;/P&gt;&lt;P&gt;Those are about your only options.&amp;nbsp; Hope that helps :)</description><pubDate>Wed, 21 Jun 2006 10:31:57 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>