public IHttpActionResult AddSearchFavorite([FromUri] int listId, [FromBody] SearchFavorite favorite)
        {
            if (favorite == null)
            {
                return(BadRequest($"missing parameter {nameof(favorite)}"));
            }

            var favourite = sqlDataAccess.AddFavorite(ControllerHelper.GetCurrentUserId(), listId, favorite);

            return(Content(HttpStatusCode.Created, favourite));
        }
示例#2
0
        private readonly SortSlideList sortSlideList;       //変更済み

        public PhotoFrameApplication(KeywordRepository keywordRepository, PhotoRepository photoRepository, PhotoFileService photoFileService)
        {
            this.createPhotoList = new CreatePhotoList(photoRepository, photoFileService); //済み
            this.addKeyword      = new AddKeyword(keywordRepository);                      //済み
            this.changeKeyword   = new ChangeKeyword(keywordRepository, photoRepository);  //済み
            this.changeFavorite  = new ChangeFavorite(photoRepository);                    //済み
            this.searchKeyword   = new SearchKeyword();                                    //済み
            this.searchFavorite  = new SearchFavorite();                                   //済み
            this.searchDate      = new SearchDate();                                       //済み
            this.sortDate        = new SortDate();                                         //済み
            this.sortSlideList   = new SortSlideList();                                    //済み
        }
示例#3
0
 public Form1(KeywordRepository in_keywordRepository, PhotoRepository in_photoRepository, PhotoFileService in_photoFileService)
 {
     InitializeComponent();
     this.keywordRepository = in_keywordRepository;
     this.photoRepository   = in_photoRepository;
     this.photoFileService  = in_photoFileService;
     addKeyword             = new AddKeyword(keywordRepository);
     changeFavorite         = new ChangeFavorite(photoRepository);
     changeKeyword          = new ChangeKeyword(keywordRepository, photoRepository);
     createPhotoList        = new CreatePhotoList(photoRepository, photoFileService);
     searchDate             = new SearchDate();
     searchFavorite         = new SearchFavorite();
     searchKeyword          = new SearchKeyword();
     sortDate = new SortDate();
     End_DateTimePicker.MaxDate = DateTime.Today;
 }