<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Overview of Data Validation in LightSwitch Applications (Prem Ramanathan)</title><link>http://blogs.msdn.com/b/lightswitch/archive/2010/08/30/overview-of-data-validation-in-lightswitch-applications-prem-ramanathan.aspx</link><description>Introduction 
 In any application that accepts user input and stores it in a data store, the data needs to be validated. When it comes to relational databases, most of them today provide some form of validation. This includes constraints, data formatting</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Overview of Data Validation in LightSwitch Applications (Prem Ramanathan)</title><link>http://blogs.msdn.com/b/lightswitch/archive/2010/08/30/overview-of-data-validation-in-lightswitch-applications-prem-ramanathan.aspx#10056982</link><pubDate>Wed, 01 Sep 2010 20:29:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10056982</guid><dc:creator>LightSwitch Team</dc:creator><description>&lt;p&gt;@James: Unfortunately, there is no way currently to reuse EntityValidationResultsBuilder or ValidationSummaryViewer outside of LightSwitch applications. They are custom built for LightSwitch, and not meant for use outside of LightSwitch.&lt;/p&gt;
&lt;p&gt;@VPX: It seems that there is some problem in the relationship between the entities. Open the employee entity in the designer, and verify that it matches the specs as in the screenshot in the blog. Also, make sure that there is 1:Many relationship between employee and vacation.&lt;/p&gt;
&lt;p&gt;-&lt;/p&gt;
&lt;p&gt;Prem.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10056982" width="1" height="1"&gt;</description></item><item><title>re: Overview of Data Validation in LightSwitch Applications (Prem Ramanathan)</title><link>http://blogs.msdn.com/b/lightswitch/archive/2010/08/30/overview-of-data-validation-in-lightswitch-applications-prem-ramanathan.aspx#10056867</link><pubDate>Wed, 01 Sep 2010 15:31:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10056867</guid><dc:creator>Paul Patterson</dc:creator><description>&lt;p&gt;Thanks Pren! &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10056867" width="1" height="1"&gt;</description></item><item><title>re: Overview of Data Validation in LightSwitch Applications (Prem Ramanathan)</title><link>http://blogs.msdn.com/b/lightswitch/archive/2010/08/30/overview-of-data-validation-in-lightswitch-applications-prem-ramanathan.aspx#10056859</link><pubDate>Wed, 01 Sep 2010 15:16:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10056859</guid><dc:creator>VPX</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Working thru the example, I get the error &amp;#39;Employee&amp;#39; is not a member of &amp;#39;EmployeeTrax.Vacation&amp;#39; in the VB code that checks for multiple employees on vacation at same time. VB Line:&lt;/p&gt;
&lt;p&gt; If vacation.Employee.Equals(entity.Employee) Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; Continue For&lt;/p&gt;
&lt;p&gt; End If&lt;/p&gt;
&lt;p&gt;Error keeps program from compiling. Any ideas or suggestions.&lt;/p&gt;
&lt;p&gt;Thx.&lt;/p&gt;
&lt;p&gt;Vern&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10056859" width="1" height="1"&gt;</description></item><item><title>re: Overview of Data Validation in LightSwitch Applications (Prem Ramanathan)</title><link>http://blogs.msdn.com/b/lightswitch/archive/2010/08/30/overview-of-data-validation-in-lightswitch-applications-prem-ramanathan.aspx#10056791</link><pubDate>Wed, 01 Sep 2010 13:12:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10056791</guid><dc:creator>James Chaldecott</dc:creator><description>&lt;p&gt;That looks nice.&lt;/p&gt;
&lt;p&gt;Is there any way we could use this framework from a desktop WPF app? I&amp;#39;m particularly thinking about the EntityValidationResultsBuilder and the Validation Summary Viewer.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10056791" width="1" height="1"&gt;</description></item><item><title>re: Overview of Data Validation in LightSwitch Applications (Prem Ramanathan)</title><link>http://blogs.msdn.com/b/lightswitch/archive/2010/08/30/overview-of-data-validation-in-lightswitch-applications-prem-ramanathan.aspx#10056654</link><pubDate>Wed, 01 Sep 2010 03:41:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10056654</guid><dc:creator>LightSwitch Team</dc:creator><description>&lt;p&gt;@Attila: LightSwitch abstracts underlying technologies and presents a more uniform experience across the product. In case of validation, LightSwitch allows developers to write extensions which can provide predefined validation rules, which can be set through proeprty sheet. There are few predefined validation rules that come out of the box. &amp;nbsp;Also, LightSwitch validation is more than just validation errors. You can have Warnings/Informations as part of validation rules which is not supported by .net validation attributes. These are few reasons why LightSwitch doesn&amp;#39;t use the .Net attributes. &lt;/p&gt;
&lt;p&gt;@falken007: You are correct that LightSwitch does provide set of common patterns for writing code. The &amp;quot;no code&amp;quot; or predefined validators can be created by pro developers by writing extensions to LightSwitch. Validators apply to types, and entity properties can use validators for that type.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10056654" width="1" height="1"&gt;</description></item><item><title>re: Overview of Data Validation in LightSwitch Applications (Prem Ramanathan)</title><link>http://blogs.msdn.com/b/lightswitch/archive/2010/08/30/overview-of-data-validation-in-lightswitch-applications-prem-ramanathan.aspx#10056625</link><pubDate>Wed, 01 Sep 2010 01:40:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10056625</guid><dc:creator>petr.antos</dc:creator><description>&lt;p&gt;Attila: Sure you know, .NET is general system platform and C#/VB are general languages, LS goes further toward set of common patterns and its layout in LOB application done right (by done right I mean really right; many developers even dont know why they are not right in some scenarios). Here the patterns are implemented, allowing callbacks to custom bussines code only, with proper extensibility at both server and client side. &lt;/p&gt;
&lt;p&gt;.NET Attributes are declarative at compile time (or heavy way using reflection, aatribute is instance of class), LS is now quite lot compiled ahead but it may &amp;quot;run live model&amp;quot; compilling through DLR in future, so needs to be efficient so here are methods. Designer also know properties and events only and DataAnnotations are rather primarily ASP.NET MVC convention?? Or not? LS has its own level even on top of EF for some reasons.&lt;/p&gt;
&lt;p&gt;As I understood LS, declarative &amp;quot;no code&amp;quot; validations are supported by creating (even quite complex) custom LS entity datatype (sys developers do) which is then reused in bussines applications (app developers do).&lt;/p&gt;
&lt;p&gt;Could somebody clear this?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10056625" width="1" height="1"&gt;</description></item><item><title>re: Overview of Data Validation in LightSwitch Applications (Prem Ramanathan)</title><link>http://blogs.msdn.com/b/lightswitch/archive/2010/08/30/overview-of-data-validation-in-lightswitch-applications-prem-ramanathan.aspx#10056158</link><pubDate>Tue, 31 Aug 2010 06:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10056158</guid><dc:creator>Attila</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Why don&amp;#39;t you take advantage of the Attributes provided by DataAnnotations? &lt;/p&gt;
&lt;p&gt;Custom coding every validation rule in a real world app instead of leveraging the support what .Net provides and just assigning validators to properties is a no brainer for me :-( This method is like Access in 2000...&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Attila&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10056158" width="1" height="1"&gt;</description></item><item><title>re: Overview of Data Validation in LightSwitch Applications (Prem Ramanathan)</title><link>http://blogs.msdn.com/b/lightswitch/archive/2010/08/30/overview-of-data-validation-in-lightswitch-applications-prem-ramanathan.aspx#10056078</link><pubDate>Tue, 31 Aug 2010 01:53:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10056078</guid><dc:creator>Michael Washington</dc:creator><description>&lt;p&gt;Wow. I have implemented this sort of thing manually so I know what it takes. This is the better way of doing things.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10056078" width="1" height="1"&gt;</description></item></channel></rss>