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)); }
/// <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."); }
public RepositoryWrapper(ProfileDBContext repositoryContext) { _repoContext = repositoryContext; }
public RepositoryBase(ProfileDBContext repositoryContext) { this.RepositoryContext = repositoryContext; }
public ProfileRepository(ProfileDBContext repositoryContext) : base(repositoryContext) { }
public CommentChannelRepository(ProfileDBContext repositoryContext) : base(repositoryContext) { }
public CommentVideoRepository(ProfileDBContext repositoryContext) : base(repositoryContext) { }
public VideosRepository(ProfileDBContext repositoryContext) : base(repositoryContext) { }