我想实现我的persitent类使用接口。我创建了以下如何使用接口与Telerik OpenAccess
public interface IFoo
{
int Id {get;set;}
}
public class Foo : IFoo
{
private int _id;
public int Id {get{return _id;} set{_id = value;}}
}
public interface IBar
{
int Id {get;set;}
IFoo Foo {get;set;}
}
public class Bar : IBar
{
private int _id;
private IFoo _foo;
public int Id {get{return _id;} set{_id = value;}}
public IFoo Foo {get{return _foo;} set{_foo = value;}}
}
是否有可能以表明foo是一个有效的类,默认情况下使用它,我不希望使用数据库来存储类类型。
感谢
罗汉