Created
November 12, 2013 11:21
-
-
Save csharpforevermore/7429347 to your computer and use it in GitHub Desktop.
Entity Framework, code-first example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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