您的位置:首页 > 其它

接口多适用类

2015-10-06 08:02 417 查看
public class IC
{
public int Id { get; set; }
}
public class test
{
public Bll bll=new Bll();
public void YouMath()
{
var model = new IC();
bll.Add(model);
}

}

public class Bll : IBll
{
public void Delete(int id)
{
throw new NotImplementedException();
}

public void Add(IC model)
{
throw new NotImplementedException();
}

public void Update(IC model)
{
throw new NotImplementedException();
}

public void Get(int id)
{
throw new NotImplementedException();
}

public void GetModelsByPage(int currPage, int pageSize)
{
throw new NotImplementedException();
}

public void DoSomeThin()
{
throw new NotImplementedException();
}
}
public interface IBll : IBaseBll<IC>
{
void DoSomeThin();
}

public interface IBaseBll<in T> where T : new()
{
void Delete(int id);
void Add(T model);
void Update(T model);
void Get(int id);
void GetModelsByPage(int currPage, int pageSize);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: