Entity Framework has a Code First aspect that can just map to existing tables as well. This allows you to use POCOs to represent your tables. You can create Mapping Classes that allow you to separate your POCOs from your database mapping logic.
You can specify if there is a different naming of the table column from the POCO. If there is no difference between the two however, you can omit it.
using ProjectName.Models;
using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
public class ProfileMapping : EntityTypeConfiguration<Profile>
{
public ProfileMapping()
{
// Primary Key
this.HasKey(t => t.Id);
// Map POCO name to Column Name
this.Property(t => t.Firstname)
.HasColumnName("First_Name")
.HasMaxLength("256");
// Table Mapping
this.ToTable("Profiles");
// Relationships
this.HasRequired(t => t.Roles);
}
}
Using the DbContext you can register these mappings.
I would recommend using the Entity Framework Power Tools to generate your DbContext from an existing database.
http://visualstudiogallery.msdn.microsoft.com/72a60b14-1581-4b9b-89f2-846072eff19d