You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
tinyPos/TinyPOS/TinyPosEntity/EntityContext.cs

32 lines
814 B

using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TinyPosEntity
{
public class EntityContext : DbContext
{
public static string ConnectionString { get; set; }
public EntityContext() : base(ConnectionString)
{
}
public DbSet<Transaction> Transactions { get; set; }
public DbSet<TransactionItem> TransactionItems { get; set; }
public DbSet<Product> Products { get; set; }
public DbSet<ProductType> ProductTypes { get; set; }
}
public class EntityInitializer : DropCreateDatabaseAlways<EntityContext>
{
protected override void Seed(EntityContext context)
{
base.Seed(context);
}
}
}