using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Tango.DAL.Local.DB { /// /// Represents an SQLite database context. /// /// public partial class LocalDB : DbContext { /// /// Initializes a new instance of the class. /// /// The file path. public LocalDB(String filePath) : base(ComposeConnectionString(filePath)) { } /// /// Composes the connection string. /// /// The file path. /// private static String ComposeConnectionString(String filePath) { return String.Format("metadata=res://*/DB.LocalADO.csdl|res://*/DB.LocalADO.ssdl|res://*/DB.LocalADO.msl;provider=System.Data.SQLite.EF6;provider connection string=\"data source={0}\"", filePath); } } }