Ejemplo n.º 1
0
        public IActionResult Get()
        {
            var db = new ProfileDBContext();


            var profile = db.Profile
                          .OrderByDescending(x => x.creationDate).Select(x => new
            {
                profile = new
                {
                    x.Id,
                    x.name,
                    x.title,
                    x.catchphrase,
                    x.birthdate,
                    x.localisation,
                    x.nationality,
                },

                x.experiences,
                x.languages,
                x.contacts,
                x.skills,
                x.educations,
            }).FirstOrDefault();

            return(new JsonResult(profile));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="profilecontext"></param>
        /// <param name="huapidbcontext"></param>
        /// <param name="stagecontext"></param>
        /// <param name="cfg"></param>
        /// <param name="logger"></param>
        public SQLProfileDAL(ProfileDBContext profilecontext, HUAPIDBContext huapidbcontext, ProfileStageDBDataContext stagecontext, IOptions <CustomConfig> cfg, ILogger <SQLProfileDAL> logger)
        {
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Restart();

            _logger                = logger;
            _cfg                   = cfg;
            _huapidbcontext        = huapidbcontext;
            _profiledbcontext      = profilecontext;
            _profilestagedbcontext = stagecontext;
            sourceDBName           = profilecontext.Database.GetDbConnection().Database;
            stageDBName            = stagecontext.Database.GetDbConnection().Database;

            stopwatch.Stop();
            _logger.LogDebug($"profile db data context time required for the first query: {stopwatch.ElapsedMilliseconds / 1000} seconds.");
        }
Ejemplo n.º 3
0
 public RepositoryWrapper(ProfileDBContext repositoryContext)
 {
     _repoContext = repositoryContext;
 }
Ejemplo n.º 4
0
 public RepositoryBase(ProfileDBContext repositoryContext)
 {
     this.RepositoryContext = repositoryContext;
 }
Ejemplo n.º 5
0
 public ProfileRepository(ProfileDBContext repositoryContext)
     : base(repositoryContext)
 {
 }
 public CommentChannelRepository(ProfileDBContext repositoryContext)
     : base(repositoryContext)
 {
 }
Ejemplo n.º 7
0
 public CommentVideoRepository(ProfileDBContext repositoryContext)
     : base(repositoryContext)
 {
 }
Ejemplo n.º 8
0
 public VideosRepository(ProfileDBContext repositoryContext)
     : base(repositoryContext)
 {
 }