/// <summary> /// Dev: Startup integrity check /// /// @TODO: Once basic entity relations and related stuff is fixed, /// we need to find a secure way to verify the integrity/availability /// of the data access layer. /// </summary> /// <returns></returns> public static bool Prepare() { try { using (var context = new NtErpContext()) { //context.Database.CreateIfNotExists(); //if (!context.Database.CompatibleWithModel(true)) // Debug.WriteLine("Database model is not compatible with class structure!"); Debug.WriteLine("PRODUCT REPOSITORY"); Debug.WriteLine(" [Entity] Products: " + context.Products.Count()); } } catch (Exception ex) { Debug.WriteLine(ex.GetType().Name + ": " + ex.Message); throw; } return(true); }
public TaxRateRepository(NtErpContext context) : base(context) { }
public CashJournalRepository(NtErpContext context) : base(context) { }
public RepositoryBase(NtErpContext context) { _context = context; }
/// <summary> /// Constructor /// </summary> /// <param name="context"></param> public ProductRepository(NtErpContext context) : base(context) { }