Here's an abbreviated class defining a run table.
Code: Select all
[Table("Runs")]
public partial class RunItem
{
[Column("projectName", TypeName = "TEXT")]
public String ProjectName
{
...
}
[Column("id")]
public Int64 Id
{
....
}
[Key]
[Index]
[Column("runDateTime")]
public Int64 RunDateTime
{
.....
}
}
Code: Select all
public class RunItemContext : DbContext
{
public DbSet<RunItem> Items { set; get; }
static RunItemContext()
{
System.Data.Entity.Database.SetInitializer<RunItemContext>(new CreateDatabaseIfNotExists<RunItemContext>());
}
}
Almost everything seems to work fine. The only problem is that the database created uses Int32 in place of Int64. I've tried a number of options for the TypeName attribute of the column annotation. Outside that, there doesn't seem to be many ways to control the data type without going to Entity Developer. (At least nothing well documented.)
Is there a way to handle this issue without resorting to using Entity Developer?