Showing Posts for C#

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

Michael Roma

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

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

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

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

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

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

Quick Reference guide for C# Razor syntax

  • C#
  • ASP.NET
  • Razor

Using Inheritance in Entity Framework

Michael Roma

C# Examples on how to use inheritance in Entity Framework

  • C#
  • Entity Framework
  • SQL

C# Lambda Expression examples

Michael Roma

Examples of Lambda expressions in C#

  • C#

C# Anonymous functions

Michael Roma

Examples of an anonymous function in C#

  • C#