public void Test_GetProvider() { IObjectProvider <Object1> provider = IocManager.Instance.Resolve <IObjectProvider <Object1> >(); Assert.IsNotNull(provider); MyDbObject obj = provider.GetObject(); Assert.IsNotNull(obj); Assert.IsTrue(obj.Is <Object1>()); }
protected User(MyDbObject dbObject) { // creates an object representing an existing user, from a database object }
private ExtendedUser(MyDbObject dbObject) : base(dbObject) { //add extra data onto the base class here }
public static ExtendedUser GetExtendedUser(MyDbObject dbObj) { return(new ExtendedUser(dbObject)); }
public static User GetUser(MyDbObject dbObject) { return(User(dbObject)); }