Skip to content

Instantly share code, notes, and snippets.

@csharpforevermore
Created November 12, 2013 11:21
Show Gist options
  • Save csharpforevermore/7429347 to your computer and use it in GitHub Desktop.
Save csharpforevermore/7429347 to your computer and use it in GitHub Desktop.
Entity Framework, code-first example
using System;
using System.Data.Entity;
namespace Website.Models.Logging
{
public class Log
{
public int LogId { get; set; }
public DateTime TimeStarted { get; set; }
public int Total { get; set; }
}
public class LogContext : DbContext
{
public DbSet<Log> Logs { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment