I have an entity like:
public class EventItem
{
public int Id { get; set; }
public int Vn { get; set; }
public DateTimeOffset EventDate { get; set; }
...
}
..and then use EF fluent API to construct the db:
public class EventItemConfiguration : EntityTypeConfiguration<EventItem>
{
public CatalystItemConfiguration()
{
ToTable("events");
HasKey(key => key.Id);
Property(item => item.Id).HasColumnName("event_id").HasColumnType("int");
Property(item => item.Vn).HasColumnName("event_vn").HasColumnType("int").IsRequired().IsConcurrencyToken();
Property(item => item.EventDate).HasColumnName("event_date").HasColumnType("datetimeoffset").IsRequired();
....
}
}
Now this all works when talking to SQL 2008. For testing I use SQL CE 4.0 and because Sql CE doesnt support datetimeoffset, the code above falls in a heap.
What are my options in getting this to work for Sql 2008 and Sql CE?