public ActionResult Details(string broadcaster) { var repo = new FaceRepository(); var content = repo.GetForDetailsPage(broadcaster); return(View(content)); }
public ActionResult Charts() { var repo = new FaceRepository(); var content = repo.GetForChartsPage(); return(View(content)); }
public void Setup() { _keys = GetKeys(); var client = new MicrosoftCognitiveServicesRepositoryClient(); _sut = new FaceRepository(_keys, client); }
// GET: Ajax public ActionResult GetAnalysedByBroadcaster(string name) { var repo = new FaceRepository(); var content = repo.GetForStartPage(name); return(Json(content, JsonRequestBehavior.AllowGet)); }
public void CachModul() { FaceRepository repository = new FaceRepository(); ÑacheModul ñacheModul = new ÑacheModul(repository); for (int i = 0; i < 5; i++) { IComondModul <IMyEntity> comondGet = ñacheModul.Ñommand(comondModul.GetComond(typeof(IUser), TypeComond.Get, null)); } Assert.Equal(1, repository.amount(TypeComond.Get)); }
public ActionResult GetGenderRepresentation(string broadcaster) { if (string.IsNullOrEmpty(broadcaster)) { broadcaster = "SverigesRadio"; } var repo = new FaceRepository(); var content = repo.GetForStartPage(broadcaster); return(View(content)); }
public void CachModul() { FaceRepository repository = new FaceRepository(); СacheModul сacheModul = new СacheModul(repository); for (int i = 0; i < 5; i++) { IComondModul <IMyEntity> comondGet = сacheModul.Сommand(comondModul.GetComond(typeof(IUser), TypeComond.Get, null)); } if (repository.amount(TypeComond.Get) != 1) { throw new Exception("CachModul отпровляет много запросов get вместо одного"); } }
public async Task <bool> AddUserAsync() { HttpContext.Request.Headers.TryGetValue("id", out StringValues id); HttpContext.Request.Headers.TryGetValue("name", out StringValues name); HttpContext.Request.Headers.TryGetValue("password", out StringValues password); SpeakerRepository speakerApi = new SpeakerRepository(); CreateVerificationProfileModel profile = await speakerApi.CreateVerificationProfile(SpeakerApiKey); FaceRepository faceApi = new FaceRepository(); Person person = await faceApi.CreatePerson("authorized", name); UserEntity user = new UserEntity(Int32.Parse(id), name, password, profile.VerificationProfileId.ToString(), person.PersonId.ToString(), 0, 0); table.AddorReplaceUser(user); return(true); }
public FaceController() { api = new FaceRepository(); }
public FaceRepositoryShould() { _context = new MockDataContext(); _faceRepository = new FaceRepository(_context); }