/// <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))); }
/// <summary> /// 编辑 /// </summary> /// <param name="model"></param> /// <returns></returns> public async Task <UserWatchHistory> EditUserWatchHistory(UserWatchHistory model) { return(await this.server.EditAsync(model).ConfigureAwait(false)); }