public static Contracts.Client.IControllerAccess <I> Create <I>() where I : Contracts.IIdentifiable { Contracts.Client.IControllerAccess <I> result = null; if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.Account.ILoginSession)) { result = new Controllers.Persistence.Account.LoginSessionController(CreateContext()) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.Account.IRole)) { result = new Controllers.Persistence.Account.RoleController(CreateContext()) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.Account.IUser)) { result = new Controllers.Persistence.Account.UserController(CreateContext()) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.Account.IUserXRole)) { result = new Controllers.Persistence.Account.UserXRoleController(CreateContext()) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QuickNSmart.Contracts.Business.Account.ILoginUser)) { result = new Controllers.Business.Account.LoginUserController(CreateContext()) as Contracts.Client.IControllerAccess <I>; } return(result); }
public static Contracts.Client.IControllerAccess <I> Create <I>() where I : Contracts.IIdentifiable { Contracts.Client.IControllerAccess <I> result = null; if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.TestOneToMany.IInvoice)) { result = new Controllers.Persistence.TestOneToMany.InvoiceController(CreateContext()) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.TestOneToMany.IInvoiceDetail)) { result = new Controllers.Persistence.TestOneToMany.InvoiceDetailController(CreateContext()) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.Account.IRole)) { result = new Controllers.Persistence.Account.RoleController(CreateContext()) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.Account.IUser)) { result = new Controllers.Persistence.Account.UserController(CreateContext()) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QuickNSmart.Contracts.Business.TestOneToMany.IInvoiceDetails)) { result = new Controllers.Business.TestOneToMany.InvoiceDetailsController(CreateContext()) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QuickNSmart.Contracts.Business.Account.IAppAccess)) { result = new Controllers.Business.Account.AppAccessController(CreateContext()) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QuickNSmart.Contracts.Business.Account.IIdentityUser)) { result = new Controllers.Business.Account.IdentityUserController(CreateContext()) as Contracts.Client.IControllerAccess <I>; } return(result); }
public static Contracts.Client.IControllerAccess <I> Create <I>(object sharedController) where I : Contracts.IIdentifiable { Contracts.Client.IControllerAccess <I> result = null; if (typeof(I) == typeof(QnSBillShare.Contracts.Persistence.App.IBill)) { result = new Controllers.Persistence.App.BillController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSBillShare.Contracts.Persistence.App.IExpense)) { result = new Controllers.Persistence.App.ExpenseController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSBillShare.Contracts.Persistence.Account.ILoginSession)) { result = new Controllers.Persistence.Account.LoginSessionController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSBillShare.Contracts.Persistence.Account.IRole)) { result = new Controllers.Persistence.Account.RoleController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSBillShare.Contracts.Persistence.Account.IUser)) { result = new Controllers.Persistence.Account.UserController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSBillShare.Contracts.Persistence.Account.IUserXRole)) { result = new Controllers.Persistence.Account.UserXRoleController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSBillShare.Contracts.Business.App.IBillExpenses)) { result = new Controllers.Business.App.BillExpensesController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSBillShare.Contracts.Business.Account.ILoginUser)) { result = new Controllers.Business.Account.LoginUserController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } return(result); }
public static Contracts.Client.IControllerAccess <I> Create <I>(object sharedController) where I : Contracts.IIdentifiable { Contracts.Client.IControllerAccess <I> result; if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.Language.ITranslation)) { result = new Controllers.Persistence.Language.TranslationController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.Data.IBinaryData)) { result = new Controllers.Persistence.Data.BinaryDataController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.Configuration.IIdentitySetting)) { result = new Controllers.Persistence.Configuration.IdentitySettingController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.Configuration.ISetting)) { result = new Controllers.Persistence.Configuration.SettingController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.App.IAward)) { result = new Controllers.Persistence.App.AwardController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.App.IJuror)) { result = new Controllers.Persistence.App.JurorController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.App.IMember)) { result = new Controllers.Persistence.App.MemberController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.App.IProject)) { result = new Controllers.Persistence.App.ProjectController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.App.IRating)) { result = new Controllers.Persistence.App.RatingController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.Account.IAccess)) { result = new Controllers.Persistence.Account.AccessController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.Account.IActionLog)) { result = new Controllers.Persistence.Account.ActionLogController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.Account.IIdentity)) { result = new Controllers.Persistence.Account.IdentityController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.Account.IIdentityXRole)) { result = new Controllers.Persistence.Account.IdentityXRoleController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.Account.ILoginSession)) { result = new Controllers.Persistence.Account.LoginSessionController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.Account.IRole)) { result = new Controllers.Persistence.Account.RoleController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Persistence.Account.IUser)) { result = new Controllers.Persistence.Account.UserController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Business.Account.IAppAccess)) { result = new Controllers.Business.Account.AppAccessController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else if (typeof(I) == typeof(QnSProjectAward.Contracts.Business.Account.IIdentityUser)) { result = new Controllers.Business.Account.IdentityUserController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>; } else { throw new Logic.Modules.Exception.LogicException(Modules.Exception.ErrorType.InvalidControllerType); } return(result); }