Example #1
0
 public ValuesController (cmsContext context) {
     _context = context;
     lstItems = (from a in _context.Article join al in _context.ArticleLanguage on a.ArticleId equals al.FkArticleId
         where al.LangName == "ar"
         select new ArticleData {
             ArticleId = a.ArticleId,
                 ArticleTitle = al.Title,
                 ImagePath = a.ImagePath,
                 published = a.IsPublished
         }).ToList ();
 }
Example #2
0
        public productTest()
        {
            DbContextOptions <cmsContext> options;
            var builder = new DbContextOptionsBuilder <cmsContext>();

            //builder.UseSqlServer(connectionstr);
            builder.UseInMemoryDatabase(databaseName: "kevsDatabase");
            options = builder.Options;

            _context = new cmsContext(options);

            InitialiseData();
        }
Example #3
0
 public EntryController()
 {
     this.context = new cmsContext();
     context.Configuration.ProxyCreationEnabled = false;
 }
Example #4
0
        public SecurityController(cmsContext context, JwtSettings settings)
        {
            _context = context;

            _settings = settings;
        }
Example #5
0
 public ProductsService(cmsContext context)
 {
     _context = context;
 }
 public ProductController(cmsContext context)
 {
     _context = context;
     //this.configuration = Configuration;
     //this.connectionString = this.configuration.GetConnectionString("kevinangularcms");
 }
Example #7
0
 public void Dispose()
 {
     _context = null;
 }
Example #8
0
 public SecurityService(cmsContext context)
 {
     _context = context;
 }
Example #9
0
 public SecurityManager(cmsContext context, JwtSettings settings)
 {
     _settings = settings;
     _context  = context;
 }