public RestfulResult Create(FavoriteCreateRequest request, int?authuid)
 {
     request.AuthUid = authuid.Value;
     return(new RestfulResult {
         Data = this._favoriteDataService.Create(request)
     });
 }
Exemple #2
0
        public FavoriteCreateResponse Create([FromBody] FavoriteCreateRequest request)
        {
            FavoriteCreateResponse response = new FavoriteCreateResponse();

            favoriteRepository.Create(favoriteConvertor.toEntity(request));

            response.Status = 1;
            return(response);
        }
        public FavoriteEntity toEntity(FavoriteCreateRequest request)
        {
            FavoriteEntity entity = new FavoriteEntity();

            entity.Host       = request.Host;
            entity.Title      = request.Title;
            entity.CategoryId = request.CategoryId != null ? request.CategoryId.Value : 0;

            return(entity);
        }
Exemple #4
0
        /// <summary>
        /// 收藏
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public ExecuteResult Create(FavoriteCreateRequest request)
        {
            //return new ExecuteResult();

            throw new NotImplementedException();
        }