コード例 #1
0
        /// <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);
        }
コード例 #2
0
 public TaxRateRepository(NtErpContext context) : base(context)
 {
 }
コード例 #3
0
 public CashJournalRepository(NtErpContext context) : base(context)
 {
 }
コード例 #4
0
 public RepositoryBase(NtErpContext context)
 {
     _context = context;
 }
コード例 #5
0
 /// <summary>
 ///   Constructor
 /// </summary>
 /// <param name="context"></param>
 public ProductRepository(NtErpContext context) : base(context)
 {
 }