<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments for Jammer.NET - Open Source C# Software Development Framework</title>
	<atom:link href="http://projectjammer.net/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://projectjammer.net</link>
	<description>Open Source C# Software Development Framework</description>
	<pubDate>Tue, 02 Dec 2008 13:00:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on How to Create a Two-way Object Binding for ASP.NET WebForms by Randolph Cabral</title>
		<link>http://projectjammer.net/2007/08/08/how-to-create-a-two-way-object-binding-for-aspnet-webforms/#comment-34</link>
		<dc:creator>Randolph Cabral</dc:creator>
		<pubDate>Fri, 30 May 2008 20:47:43 +0000</pubDate>
		<guid isPermaLink="false">http://projectjammer.net/2007/08/08/how-to-create-a-two-way-object-binding-for-aspnet-webforms/#comment-34</guid>
		<description>In this case, I would recommend overriding the base Save() method.
 

&lt;code&gt;public override void Save()
{
  if (Status == 1 &#38;&#38; this.IsLoadedFromDb)
    Status == 0;
 
  base.Save();  
}&lt;/code&gt;


IsLoadedFromDb property is the flag used by the base class to determine whether to run the insert or update stored procedures.

The Validate() method is meant to be used with IValidator classes.  Each entity has a protected member called Validators where you can implement your own validator if you wish.  Note that calling the Validate() method will now throw exceptions.  Instead, it puts all of the validation error objects in a ValidationErrors errors collection that you must implement as a part of the IEntityValidateable interface.  Our typical usage of this feature looks like this:
 

&lt;code&gt;public override void Save()
{
  Validate();
  if (ValidationErrors.Count &#62; 0)
  {
    StringBuilder sb = new StringBuilder();
    foreach (var error in ValidationErrors)
    {
      sb.AppendLine(error.Description);
    }
    throw new Jmr.Common.ValidationException(sb.ToString());
  }
 
  base.Save();
}&lt;/code&gt;


-Randy</description>
		<content:encoded><![CDATA[<p>In this case, I would recommend overriding the base Save() method.</p>
<p><code>public override void Save()<br />
{<br />
  if (Status == 1 &amp;&amp; this.IsLoadedFromDb)<br />
    Status == 0;</p>
<p>  base.Save();<br />
}</code></p>
<p>IsLoadedFromDb property is the flag used by the base class to determine whether to run the insert or update stored procedures.</p>
<p>The Validate() method is meant to be used with IValidator classes.  Each entity has a protected member called Validators where you can implement your own validator if you wish.  Note that calling the Validate() method will now throw exceptions.  Instead, it puts all of the validation error objects in a ValidationErrors errors collection that you must implement as a part of the IEntityValidateable interface.  Our typical usage of this feature looks like this:</p>
<p><code>public override void Save()<br />
{<br />
  Validate();<br />
  if (ValidationErrors.Count &gt; 0)<br />
  {<br />
    StringBuilder sb = new StringBuilder();<br />
    foreach (var error in ValidationErrors)<br />
    {<br />
      sb.AppendLine(error.Description);<br />
    }<br />
    throw new Jmr.Common.ValidationException(sb.ToString());<br />
  }</p>
<p>  base.Save();<br />
}</code></p>
<p>-Randy</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Create a Two-way Object Binding for ASP.NET WebForms by Mirza baig</title>
		<link>http://projectjammer.net/2007/08/08/how-to-create-a-two-way-object-binding-for-aspnet-webforms/#comment-33</link>
		<dc:creator>Mirza baig</dc:creator>
		<pubDate>Thu, 29 May 2008 21:40:49 +0000</pubDate>
		<guid isPermaLink="false">http://projectjammer.net/2007/08/08/how-to-create-a-two-way-object-binding-for-aspnet-webforms/#comment-33</guid>
		<description>Can you please provide example of using Validate() method.</description>
		<content:encoded><![CDATA[<p>Can you please provide example of using Validate() method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Create a Two-way Object Binding for ASP.NET WebForms by Mirza baig</title>
		<link>http://projectjammer.net/2007/08/08/how-to-create-a-two-way-object-binding-for-aspnet-webforms/#comment-32</link>
		<dc:creator>Mirza baig</dc:creator>
		<pubDate>Thu, 29 May 2008 21:39:55 +0000</pubDate>
		<guid isPermaLink="false">http://projectjammer.net/2007/08/08/how-to-create-a-two-way-object-binding-for-aspnet-webforms/#comment-32</guid>
		<description>How can one validate the data while insertion, like we have a Status field in my table defaulted to 1 after generating entity class how can one complete insertion without passing this as parameter.

Note : Stored Procedure is expecting this value as parameter. We don't like to send it as its defaulted during insertion.</description>
		<content:encoded><![CDATA[<p>How can one validate the data while insertion, like we have a Status field in my table defaulted to 1 after generating entity class how can one complete insertion without passing this as parameter.</p>
<p>Note : Stored Procedure is expecting this value as parameter. We don&#8217;t like to send it as its defaulted during insertion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Create an Entity / Object-relational Mapping by Randolph Cabral</title>
		<link>http://projectjammer.net/2007/08/04/how-to-create-an-entity-object-relational-mapping/#comment-31</link>
		<dc:creator>Randolph Cabral</dc:creator>
		<pubDate>Wed, 21 May 2008 21:49:19 +0000</pubDate>
		<guid isPermaLink="false">http://projectjammer.net/2007/08/04/how-to-create-an-entity-object-relational-mapping/#comment-31</guid>
		<description>Hi Mirza,

I apologize.  The reason you are getting this error is because the SecurityType entry in the web.config file is set to JmrSecurity.  Please set the value to None.  The errors will go away.



Here's an example of a business entity:
public class Car : OREntities.Car
{
  public Car(int id)
  {
    base.Id = Id;
    Load();
  }

  public void Start()
  {
    if (base.FuelAmount == 0)
      throw new CarEngineStartException("You don't have any fuel.  Fill 'er up!");
 
    if (base.IsEngineRunning)
      throw new CarEngineStartException("The engine is already running!");
 
    base.IsEngineRunning = true;
    base.FuelConsumptionFactor = base.EngineSpeed * 0.04F; 
  }
}

You can see by this example that you have a nice place to add this type of logic.  The entity layer is kept separate so that you can regenerate the entity classes if your data model changes.

In your presentation layer, you will make the reference to the Business entities so that you can call methods like Car.Start().  If you reference the Entity project you won't have access to the Start() method.

I recommend using the code generator we've written to write the entities.  This way you can login to the database and tell the code generator to read the tables and generate the entity classes and stored procedures.  It will also generate the shell for your business classes.

Hope this is helpful.
-Randy</description>
		<content:encoded><![CDATA[<p>Hi Mirza,</p>
<p>I apologize.  The reason you are getting this error is because the SecurityType entry in the web.config file is set to JmrSecurity.  Please set the value to None.  The errors will go away.</p>
<p>Here&#8217;s an example of a business entity:<br />
public class Car : OREntities.Car<br />
{<br />
  public Car(int id)<br />
  {<br />
    base.Id = Id;<br />
    Load();<br />
  }</p>
<p>  public void Start()<br />
  {<br />
    if (base.FuelAmount == 0)<br />
      throw new CarEngineStartException(&#8221;You don&#8217;t have any fuel.  Fill &#8216;er up!&#8221;);</p>
<p>    if (base.IsEngineRunning)<br />
      throw new CarEngineStartException(&#8221;The engine is already running!&#8221;);</p>
<p>    base.IsEngineRunning = true;<br />
    base.FuelConsumptionFactor = base.EngineSpeed * 0.04F;<br />
  }<br />
}</p>
<p>You can see by this example that you have a nice place to add this type of logic.  The entity layer is kept separate so that you can regenerate the entity classes if your data model changes.</p>
<p>In your presentation layer, you will make the reference to the Business entities so that you can call methods like Car.Start().  If you reference the Entity project you won&#8217;t have access to the Start() method.</p>
<p>I recommend using the code generator we&#8217;ve written to write the entities.  This way you can login to the database and tell the code generator to read the tables and generate the entity classes and stored procedures.  It will also generate the shell for your business classes.</p>
<p>Hope this is helpful.<br />
-Randy</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Create an Entity / Object-relational Mapping by Mirza Baig</title>
		<link>http://projectjammer.net/2007/08/04/how-to-create-an-entity-object-relational-mapping/#comment-30</link>
		<dc:creator>Mirza Baig</dc:creator>
		<pubDate>Wed, 21 May 2008 03:20:50 +0000</pubDate>
		<guid isPermaLink="false">http://projectjammer.net/2007/08/04/how-to-create-an-entity-object-relational-mapping/#comment-30</guid>
		<description>I m getting JmrUser Error what is the entry for Jmruser in Web Config.

if(JmrUser == null)
        Response.Redirect(ConfigurationManager.AppSettings.Get("FormLoginURL"));


Can you please give an example for entity and Business Project, will my Website Application be consuming both type of projects or will it be only one.

I m trying to write a small forum which has two tables user and post, how should I organize these two Tables in Business and entity projects.

Thank you much for your previous answers.</description>
		<content:encoded><![CDATA[<p>I m getting JmrUser Error what is the entry for Jmruser in Web Config.</p>
<p>if(JmrUser == null)<br />
        Response.Redirect(ConfigurationManager.AppSettings.Get(&#8221;FormLoginURL&#8221;));</p>
<p>Can you please give an example for entity and Business Project, will my Website Application be consuming both type of projects or will it be only one.</p>
<p>I m trying to write a small forum which has two tables user and post, how should I organize these two Tables in Business and entity projects.</p>
<p>Thank you much for your previous answers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Create an Entity / Object-relational Mapping by Randolph Cabral</title>
		<link>http://projectjammer.net/2007/08/04/how-to-create-an-entity-object-relational-mapping/#comment-29</link>
		<dc:creator>Randolph Cabral</dc:creator>
		<pubDate>Wed, 21 May 2008 00:48:07 +0000</pubDate>
		<guid isPermaLink="false">http://projectjammer.net/2007/08/04/how-to-create-an-entity-object-relational-mapping/#comment-29</guid>
		<description>Hi Mirza,
 
The difference between the Entity project and Business project is that the Entity project is where the mappings are made.  We recommend that you do not modify the Entity class as you might want to re-generate them.
 
The Business project is where you want to add all of your customizations.  Each Business class derives from an Entity class.  Because of this you can override its properties and methods giving you the ability to more closely model your domain requirements.
 
Hope this helps!
-Randolph Cabral</description>
		<content:encoded><![CDATA[<p>Hi Mirza,</p>
<p>The difference between the Entity project and Business project is that the Entity project is where the mappings are made.  We recommend that you do not modify the Entity class as you might want to re-generate them.</p>
<p>The Business project is where you want to add all of your customizations.  Each Business class derives from an Entity class.  Because of this you can override its properties and methods giving you the ability to more closely model your domain requirements.</p>
<p>Hope this helps!<br />
-Randolph Cabral</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Create an Entity / Object-relational Mapping by Randolph Cabral</title>
		<link>http://projectjammer.net/2007/08/04/how-to-create-an-entity-object-relational-mapping/#comment-28</link>
		<dc:creator>Randolph Cabral</dc:creator>
		<pubDate>Wed, 21 May 2008 00:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://projectjammer.net/2007/08/04/how-to-create-an-entity-object-relational-mapping/#comment-28</guid>
		<description>Hi Mirza,
 
The security entries in the web.config file that is needed are as follows:
 
&#60;add key="SystemReturnEmail" value="email@someaddy.com"/&#62; 
&#60;add key="ExceptionReturnEmail" value="email@someaddy.com"/&#62;
&#60;add key="ExceptionDeliveryEmail" value="email@someaddy.com"/&#62;
&#60;add key="DeveloperEmail" value="email@someaddy.com"/&#62;
&#60;add key="SecurityType" value="JmrSecurity"/&#62; 
&#60;!-- SecurityType Values = None, JmrSecurity, Database, ActiveDirectory --&#62;

The web.sitemap file should contain the following:
&#60;?xml version="1.0" encoding="utf-8"?&#62; 
&#60;siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0"&#62; 
&#60;siteMapNode url="." title="Root" description="Root Sitemap Node. Required By Ent.Lib."&#62;
&#60;siteMapNode url="relative path to file" value="Allowed Roles in ActiveDirectory Security Groups or DB Roles Table. '*' = access to everyone." title="[OPTIONAL]Title of page" description="[OPTIONAL]Description of page" /&#62;
&#60;/siteMapNode&#62;
&#60;/siteMap&#62;

I hope this helps!
-Randolph Cabral</description>
		<content:encoded><![CDATA[<p>Hi Mirza,</p>
<p>The security entries in the web.config file that is needed are as follows:</p>
<p>&lt;add key=&#8221;SystemReturnEmail&#8221; value=&#8221;email@someaddy.com&#8221;/&gt;<br />
&lt;add key=&#8221;ExceptionReturnEmail&#8221; value=&#8221;email@someaddy.com&#8221;/&gt;<br />
&lt;add key=&#8221;ExceptionDeliveryEmail&#8221; value=&#8221;email@someaddy.com&#8221;/&gt;<br />
&lt;add key=&#8221;DeveloperEmail&#8221; value=&#8221;email@someaddy.com&#8221;/&gt;<br />
&lt;add key=&#8221;SecurityType&#8221; value=&#8221;JmrSecurity&#8221;/&gt;<br />
&lt;!&#8211; SecurityType Values = None, JmrSecurity, Database, ActiveDirectory &#8211;&gt;</p>
<p>The web.sitemap file should contain the following:<br />
&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;siteMap xmlns=&#8221;http://schemas.microsoft.com/AspNet/SiteMap-File-1.0&#8243;&gt;<br />
&lt;siteMapNode url=&#8221;.&#8221; title=&#8221;Root&#8221; description=&#8221;Root Sitemap Node. Required By Ent.Lib.&#8221;&gt;<br />
&lt;siteMapNode url=&#8221;relative path to file&#8221; value=&#8221;Allowed Roles in ActiveDirectory Security Groups or DB Roles Table. &#8216;*&#8217; = access to everyone.&#8221; title=&#8221;[OPTIONAL]Title of page&#8221; description=&#8221;[OPTIONAL]Description of page&#8221; /&gt;<br />
&lt;/siteMapNode&gt;<br />
&lt;/siteMap&gt;</p>
<p>I hope this helps!<br />
-Randolph Cabral</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Create an Entity / Object-relational Mapping by Mirza baig</title>
		<link>http://projectjammer.net/2007/08/04/how-to-create-an-entity-object-relational-mapping/#comment-27</link>
		<dc:creator>Mirza baig</dc:creator>
		<pubDate>Mon, 19 May 2008 15:05:27 +0000</pubDate>
		<guid isPermaLink="false">http://projectjammer.net/2007/08/04/how-to-create-an-entity-object-relational-mapping/#comment-27</guid>
		<description>What is the difference between JMRBusinessProjecttype and JMREntityProjecttype? Which should be selected?</description>
		<content:encoded><![CDATA[<p>What is the difference between JMRBusinessProjecttype and JMREntityProjecttype? Which should be selected?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Create an Entity / Object-relational Mapping by Mirza baig</title>
		<link>http://projectjammer.net/2007/08/04/how-to-create-an-entity-object-relational-mapping/#comment-26</link>
		<dc:creator>Mirza baig</dc:creator>
		<pubDate>Mon, 19 May 2008 15:03:30 +0000</pubDate>
		<guid isPermaLink="false">http://projectjammer.net/2007/08/04/how-to-create-an-entity-object-relational-mapping/#comment-26</guid>
		<description>I m getting an error AppSetting /Security info missing from Web config. Do i need to create these in my WebConfig file on the project.


How to create web.sitemap file and what information should be provided in there.</description>
		<content:encoded><![CDATA[<p>I m getting an error AppSetting /Security info missing from Web config. Do i need to create these in my WebConfig file on the project.</p>
<p>How to create web.sitemap file and what information should be provided in there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Jammer.NET API Documentation by Randolph Cabral</title>
		<link>http://projectjammer.net/2007/08/09/jammernet-documentation/#comment-25</link>
		<dc:creator>Randolph Cabral</dc:creator>
		<pubDate>Fri, 21 Mar 2008 02:17:19 +0000</pubDate>
		<guid isPermaLink="false">http://projectjammer.net/2007/08/09/jammernet-documentation/#comment-25</guid>
		<description>Hello Meysam Sadeghi,
 
The reason you are getting this message is because the "name" attribute value of the "add" element connection string section needs to be "EducationDb".  


Like this:


&#60;add name ="EducationDb" connectionString="Data Source=.;Initial Catalog=EducationDb;Integrated Security=True" providerName ="System.Data.SqlClient"/&#62;


Once this is done, the error should go away.

Hope this helps!
-Randolph Cabral</description>
		<content:encoded><![CDATA[<p>Hello Meysam Sadeghi,</p>
<p>The reason you are getting this message is because the &#8220;name&#8221; attribute value of the &#8220;add&#8221; element connection string section needs to be &#8220;EducationDb&#8221;.  </p>
<p>Like this:</p>
<p>&lt;add name =&#8221;EducationDb&#8221; connectionString=&#8221;Data Source=.;Initial Catalog=EducationDb;Integrated Security=True&#8221; providerName =&#8221;System.Data.SqlClient&#8221;/&gt;</p>
<p>Once this is done, the error should go away.</p>
<p>Hope this helps!<br />
-Randolph Cabral</p>
]]></content:encoded>
	</item>
</channel>
</rss>
