コード例 #1
0
 public MergeOrUploadHandler(VideoCollectionDataContext dataContext, ISearchConfiguration searchConfiguration)
 {
     _dataContext       = dataContext;
     _searchIndexClient = new SearchIndexClient(
         searchConfiguration.SearchServiceName,
         searchConfiguration.IndexName,
         new SearchCredentials(searchConfiguration.ApiKey));
 }
コード例 #2
0
        public static void Seed(VideoCollectionDataContext context)
        {
            //context.DigitalAssets.AddOrUpdate(x => x.Name, new DigitalAsset()
            //{

            //});

            context.SaveChanges();
        }
コード例 #3
0
        public static void Seed(VideoCollectionDataContext context)
        {
            context.Roles.AddOrUpdate(x => x.Name, new Role()
            {
                Name = "[Video Collection Security Roles] System"
            });

            context.SaveChanges();
        }
コード例 #4
0
        public static void Seed(VideoCollectionDataContext context)
        {
            context.Videos.AddOrUpdate(x => x.Title, new Video()
            {
                Title          = "RxJS and Angular 2",
                YouTubeVideoId = "xAEFTSMEgIQ",
                Rating         = 0
            });

            context.SaveChanges();
        }
コード例 #5
0
        public static void Seed(VideoCollectionDataContext context)
        {
            var systemRole = context.Roles.First(x => x.Name == "[Video Collection Security Roles] System");
            var roles      = new List <Role>();

            roles.Add(systemRole);

            context.Users.AddOrUpdate(x => x.Username, new User()
            {
                Username = "******",
                Password = new EncryptionService().HashPassword("P@ssw0rd"),
                Roles    = roles
            });

            context.SaveChanges();
        }
コード例 #6
0
 public AddOrUpdateAuthorAvatarHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #7
0
 public GetHTMLContentsHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #8
0
 public GetArticlesHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #9
0
 public RemoveAuthorHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #10
0
 public AddOrUpdateTenantHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #11
0
 public GetUserByUsernameHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #12
0
 public MergeOrUploadArticlesHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #13
0
 public AddOrUpdateDigitalAssetHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #14
0
 public static void Seed(VideoCollectionDataContext context)
 {
     context.SaveChanges();
 }
コード例 #15
0
 public UploadDigitalAssetHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #16
0
 public GetDigitalAssetByIdHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #17
0
 public GetVideoBySlugHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #18
0
 public GetSiteMapHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #19
0
 public RemoveVideoArticleHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #20
0
 public AuthenticateHandler(VideoCollectionDataContext dataContext, IEncryptionService encryptionService)
 {
     _encryptionService = encryptionService;
     _dataContext       = dataContext;
 }
コード例 #21
0
 public GetAuthorByIdHandler(VideoCollectionDataContext dataContext, ICache cache)
 {
     _dataContext = dataContext;
     _cache       = cache;
 }
コード例 #22
0
 public GetClaimsForUserHandler(VideoCollectionDataContext dataContext)
 {
     _dataContext = dataContext;
 }