﻿<?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 / Issues  / Member name conflict with Type name. / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Fri, 21 Nov 2008 13:09:56 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Member name conflict with Type name.</title><link>http://forum.strataframe.net/Topic1609-10-1.aspx</link><description>Duh!  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/Topic1609-10-1.aspx</link><description>Jason,&lt;/P&gt;&lt;P&gt;The problem is with C# only.   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.  What you'll need to do is:&lt;/P&gt;&lt;P&gt;1) Copy the DealerType property from the .designer.cs file.  &lt;/P&gt;&lt;P&gt;2) Then go to the Business Object Mapper and customize the DealerType field on the business object.  &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. &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.  &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.  Hope that helps :)</description><pubDate>Wed, 21 Jun 2006 10:31:57 GMT</pubDate><dc:creator>Ben Chase</dc:creator></item><item><title>Member name conflict with Type name.</title><link>http://forum.strataframe.net/Topic1609-10-1.aspx</link><description>I am wrapping up my first project with Strataframe.  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.  That table contains a column named: DealerType.  So the generated class wont compile because the Member name cannot be the same as the Containing Type name.  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:10:49 GMT</pubDate><dc:creator>Jason Stevenson</dc:creator></item></channel></rss>