私はインターフェイスを使用して私の執拗なクラスを実装しようとしています。私は、次の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が有効なクラスであることを示すために、デフォルトでそれを使用することが可能です作成している、私はクラス型を格納するデータベースを使用したくありません。
おかげ
ロハン