Floating FB popout byF5debug

Validating Data in a LightSwitch Application



In this article, we are going to see how we can validate a data field by applying some validation rules in a Visual Studio Light Switch application. In our earlier article, we have seen how to handle the data with the different source provider options that are available with the Visual Studio Light Switch application in 2012 version. Light Switch application generates its own code base with the schema of the data and the relation while designing the tables. But with the front end screens which will be generated by itself in design time, we need to provide our own validation mechanism that best suits the business requirement for the specific field.        [more]

Light Switch validation can be done in three different ways as suggested by Microsoft which is of Entity validation, Screen validation and Data Service validation. Entity validation rules will validate each and every entity along with the properties that can be specified with the entity. Screen Validation rules will validate the screen properties and the data that are associated with the specific screen. Data Service Validation rules will validate the service and the data before storing the details to the storage medium. Let us see the steps on how to achieve this task in real time by providing a different validation rule for different fields in the application.

Continue Reading this Article in BR


Provide us your support by Liking us on Facebook or Following us on Twitter or Adding us on Google+

About Author: Karthikeyan Anbarasan, Microsoft MVP (Most Valuable Professional) in ASP.NET/IIS Architecture. He is the Founder and Chief Editor of the www.f5debug.net website and has authored books on Windows Phone and Business Intelligence(SSIS). He is also a Passionate Speaker and a Blogger on Microsoft Technologies.

You can Join Me On: Facebook, Twitter, Google Plus, LinkedIn

Add comment

  Country flag

  • Comment
  • Preview

Recent Posts

Random Posts

Most Viewed

URL Shortner

Create your own short urls!!!

Site Counter

free counters


This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet. I have documented my personal experience on this blog.

Protected by Copyscape Web Plagiarism Finder

Site Meter