Пример #1
0
 /// <summary>
 /// 新增
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public async Task <UserWatchHistory> AddUserWatchHistory(UserWatchHistory model)
 {
     if (!this.server.Exist(d => d.MovieId == model.MovieId && d.UserId == model.UserId))
     {
         return(await this.server.AddAsync(model).ConfigureAwait(false));
     }
     else
     {
         return(null);
     }
 }
 public async Task <ActionResult <APIReturnInfo <UserWatchHistory> > > EditUserWatchHistory(UserWatchHistory model)
 {
     return(APIReturnInfo <UserWatchHistory> .Success(await this.UserWatchHistoryDomainService.EditUserWatchHistory(model)));
 }
        public async Task <ActionResult <APIReturnInfo <UserWatchHistory> > > AddUserWatchHistory(UserWatchHistory model)
        {
            model.UserId = this.UserId();

            return(APIReturnInfo <UserWatchHistory> .Success(await this.UserWatchHistoryDomainService.AddUserWatchHistory(model)));
        }
Пример #4
0
 /// <summary>
 /// 编辑
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public async Task <UserWatchHistory> EditUserWatchHistory(UserWatchHistory model)
 {
     return(await this.server.EditAsync(model).ConfigureAwait(false));
 }