Showing Posts for C#

Connecting to a SQL Compact database using Entity Framwork in ASP.NET

Michael Roma on Apr 3, 2013

The following shows how to setup a proper connection string and DbContext in Entity Framework in order to connect to a SQL Compact database in ASP.NET.

  • ASP.NET
  • C#
  • Entity Framework

C# Helper functions to map a DataTable or DataRow to a class object

Michael Roma on Mar 30, 2013

The following methods will allow you to map your DataTable, DataRow results to a class object.

  • C#
  • SQL

Using the LIKE filter in Entity Framework

Michael Roma on Mar 19, 2013

Example on how to use the LIKE functionality in T-SQL in Entity Framework

  • C#
  • Entity Framework

Using Contains in Entity Framework for WHERE IN clause

Michael Roma on Mar 16, 2013

A common problem with parameterized queries is when you have the need for a WHERE IN clause and the IN list is variable. This is solved with Entity Framework using the Contains methods of the list.

  • C#
  • Entity Framework

Easy way to get distinct values from a .NET List

Michael Roma on Nov 25, 2012

The follow example shows how to get a list of objects that are distinct based on a property's value.

  • C#
  • Entity Framework

Counting records in associated tables in Entity Framework

Michael Roma on Aug 14, 2012

The following example shows how to query a table and count records associated in another

  • C#
  • Entity Framework
  • SQL

Good article for a C# Razor quick reference guide

Michael Roma on Aug 14, 2012

Quick Reference guide for C# Razor syntax

  • C#
  • ASP.NET
  • Razor

Using Inheritance in Entity Framework

Michael Roma on Aug 14, 2012

C# Examples on how to use inheritance in Entity Framework

  • C#
  • Entity Framework
  • SQL

C# Lambda Expression examples

Michael Roma on Jul 13, 2012

Examples of Lambda expressions in C#

  • C#

C# Anonymous functions

Michael Roma on Jul 13, 2012

Examples of an anonymous function in C#

  • C#