Page 1 of 1

Universal with EF6 for MSSQL & SQLite

Posted: Mon 24 Aug 2015 18:33
by Leandrr
Hi,

I have a project working with SQLServer & EF6. What I'm actually using its the .edmx model and POCO classes generated by a T4 template.

For instance:

Code: Select all

//POCO
public partial class Lists : IEntity
{
        public int EntryId { get; set; }
        public string ListName { get; set; }
        public string Value { get; set; }
        public string Text { get; set; }
        public double Rank { get; set; }
}

//Repository
public virtual T GetById(int id)
{
        return Dbset.Find(id);
}
What I'm trying to do is to use the dotConnect Universal product to re-use what I already have (or at least most of it) to connect to a SQLite database.

I did try several combinations but nothing seems to work. I keep getting different errors but nothing work. Also a co-worker did try with no luck.

Is this even doable?
If yes, can you provide me any example or some directions?
If no, any suggestion what's the best way to go? (I was trying to avoid having 1 model per database)

Thanks!

Re: Universal with EF6 for MSSQL & SQLite

Posted: Tue 25 Aug 2015 08:04
by Shalex
Leandrr wrote:What I'm trying to do is to use the dotConnect Universal product to re-use what I already have (or at least most of it) to connect to a SQLite database.
dotConnect Universal doesn't support Entity Framework. Please use dotConnect for SQLite Professional.
Leandrr wrote:If yes, can you provide me any example or some directions?
Sample is available at http://blog.devart.com/entity-framework ... ml#Samples. It uses the same model with different database servers.