An extension method for HtmlHelper to display error messages

Data annotations is used to validate user input.

The Controller class contains the Model State. If the Model State is not valid, the error messages are contained as dictionary, with the key corresponding to the name of the user input field.

ErrorModel is used to capture the error messages. The ErrorModel object is stored in the ViewBag for[…]

Read more

Opening a SQLite database from the Isolated Storage in Windows phone

Opening a connection to the SQLite database requires the path to the database file:

The SQLite database needs to be stored in the Isolated Storage of the application for read-write access to the database. TheIsolatedStorageFile¬†class of Windows Phone does not have a method to get the path of the file. StackOverflow has a post which provides an ugly hack[…]

Read more

Introduction to NServiceBus message processing at MSMQ endpoints

NServiceBus is a product that solves problems similar to BizTalk. BizTalk is a message broker. It is a central place to receive all messages which are distributed to backend¬†systems for further processing. NServiceBus implements the bus architecture where¬†backend systems have the infrastructure to process messages. NServiceBus is developed by Particular Software. There is a good comparision between BizTalk and NServiceBus[…]

Read more

Using SQLite database in .NET with LINQ to SQL and Entity Framework 6

SQLite is an open-source SQL database engine. It is widely used in iOS apps. Create SQLite Database SQLite has an executable sqlite3.exe. To create a database with name accounting: Open the command prompt. Execute “sqlite3 accounting.sqlite”. The above command creates an accounting database. Execute “.tables”. .tables is a SQLite command which lists all tables. Add a Company table and a[…]

Read more