大神,帮忙看一下关于匿名参数的问题

念叨悠悠 2017-08-05 05:45:08
怎样同时限制T,S的类型?

public interface IServiceBase<T, S> where T : class, new()
{
ResultModel Add(S model);

ResultModel Delete(S model);

ResultModel Edit(S model);

PagerModel GetPagerList(Expression<Func<T, bool>> predicate, int limit, int offset);

List<S> GetList(Expression<Func<T, bool>> predicate);

}

...全文
76 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
念叨悠悠 2017-08-05
  • 打赏
  • 举报
回复
唉,我弱爆了。
巴士上的邂逅 2017-08-05
  • 打赏
  • 举报
回复
        public interface IServiceBase<T, S>
            where T : class, new()
            where S : class, new()
        {
            ResultModel Add(S model);
            ResultModel Delete(S model);
            ResultModel Edit(S model);
            PagerModel GetPagerList(Expression<Func<T, bool>> predicate, int limit, int offset);
            List<S> GetList(Expression<Func<T, bool>> predicate);
        }

110,566

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧