public async Task<IHttpActionResult> Upload()
        {
            Repository repo = new Repository();
            var users = repo.Users.Any();
            var gen = new EntityGenerator<TestModel>();
            var model = await gen.FromMultipartFormData(Request.Content, typeof(TestModel));

            if (model != null)
                return Ok();
            else
                return InternalServerError();
        }
        public IList<Entities.CurrentStatistic> RetrieveProfile(Repository.IProfileRepository repository)
        {
            //retrieve from cache
            IList<CurrentStatistic> profile = ProfileClient.RetrieveProfile();
            if (profile == null)
            {
                //retrieve from database
                profile = repository.RetrieveProfile();
                //save to cache
                ProfileClient.SaveProfile(profile);
            }

            return profile;
        }
        public IList<Entities.ContestEventGoal> RetrieveGoals(Repository.IProfileRepository repository)
        {
            //retrieve from cache
            IList<ContestEventGoal> goals = ProfileClient.RetrieveGoals();
            if (goals == null)
            {
                //retrieve from database
                goals = repository.RetrieveGoals();
                //save to cache
                ProfileClient.SaveGoals(goals);
            }

            return goals;
        }
        public void RemoveImageTest()
        {
            // 준비
            Repository repository = new Repository();
            PictureRepo repo = new PictureRepo();
            ImageData data = repo.Get(91);
            int exifidx = data.ExifIdx.Value;
            int thumbidx = data.ThumbnailIdx.Value;

            // 실행
            repo.Remove(data.Idx);

            // 검증
            Assert.IsNull(repo.Get(91));
            Assert.IsNull(repository.Thumbnails.SingleOrDefault(model => model.Idx == thumbidx));
            Assert.IsNull(repository.Exifs.SingleOrDefault(model => model.Idx == exifidx));
        }
 public PictureRepo(Repository repo)
     : base(repo)
 {
 }
 public BaseRepository(BaseRepository entity)
 {
     _repo = entity._repo;
 }
 public BaseRepository(Repository repo)
 {
     _repo = repo;
 }
 public BaseRepository()
 {
     _repo = new Repository();
 }
 public AlbumRepo(Repository repo)
     : base(repo)
 {
 }