示例#1
0
        public RelationModel(PayolaContext db)
            : base(db)
        {
            foreach (RelationType relationType in Db.RelationTypes)
            {
                AddGenericRelationType(relationType);

                // If the relation type is symmetric, it represents both the relations and inverse relations. Otherwise
                // the inverse relation type is different from the realtion type so it has to be added.
                if (!relationType.IsSymmetric)
                {
                    AddGenericRelationType(relationType.InverseRelationType);
                }
            }
        }
示例#2
0
        public RelationModel(PayolaContext db)
            : base(db)
        {
            foreach (RelationType relationType in Db.RelationTypes)
            {
                AddGenericRelationType (relationType);

                // If the relation type is symmetric, it represents both the relations and inverse relations. Otherwise
                // the inverse relation type is different from the realtion type so it has to be added.
                if (!relationType.IsSymmetric)
                {
                    AddGenericRelationType (relationType.InverseRelationType);
                }
            }
        }
示例#3
0
 public VehicleModel(PayolaContext db)
     : base(db)
 {
     // NOOP
 }
示例#4
0
 public StbDivisionModel(PayolaContext db)
     : base(db)
 {
     // NOOP
 }
示例#5
0
 public InformationModel(PayolaContext db)
     : base(db)
 {
     // NOOP
 }
示例#6
0
 public EmailModel(PayolaContext db)
     : base(db)
 {
     // NOOP
 }
示例#7
0
 public IncidentModel(PayolaContext db)
     : base(db)
 {
     // NOOP
 }
示例#8
0
 public InformativeEntityModel(PayolaContext db)
     : base(db)
 {
     // NOOP
 }
示例#9
0
 /// <summary>
 ///     Initializes database connection.
 /// </summary>
 private static void InitializeDatabaseConnection()
 {
     Database.SetInitializer<PayolaContext> (new PayolaContextInitializer ());
     _dbCtx = new PayolaContext ();
 }
示例#10
0
 public PersonModel(PayolaContext db)
     : base(db)
 {
     // NOOP
 }
示例#11
0
 /// <summary>
 ///     The only constructor.
 /// </summary>
 /// <param name="path">String identifying the resource from which to scrape (local path, URL, ...).</param>
 public ScraperBase(PayolaContext ctx, string path)
 {
     _ctx = ctx;
     _path = path;
 }
示例#12
0
 public LinkScraper(PayolaContext ctx, string path)
     : base(ctx, path)
 {
 }
示例#13
0
        public IEntityModel GetEntityModel(Type entityType, PayolaContext db)
        {
            Type modelType = Type.GetType(typeof(EntityModel <>).Namespace + "." + entityType.Name + "Model");

            return((IEntityModel)GetModel(modelType, db));
        }
示例#14
0
 public ModelBase GetModel(Type modelType, PayolaContext db)
 {
     return((ModelBase)modelType.GetConstructor(new Type[] { typeof(PayolaContext) }).Invoke(new object[] { db }));
 }
示例#15
0
 public TModel GetModel <TModel> (PayolaContext db)
     where TModel : ModelBase
 {
     return((TModel)GetModel(typeof(TModel), db));
 }
示例#16
0
 public EntityModel(PayolaContext db)
     : base(db)
 {
     // NOOP
 }
示例#17
0
 public CompanyModel(PayolaContext db)
     : base(db)
 {
     // NOOP
 }
示例#18
0
 public KeywordModel(PayolaContext db)
     : base(db)
 {
     // NOOP
 }
示例#19
0
 public ReportModel(PayolaContext db)
     : base(db)
 {
     // NOOP
 }
示例#20
0
 public AddressModel(PayolaContext db)
     : base(db)
 {
     // NOOP
 }
示例#21
0
 public PhoneModel(PayolaContext db)
     : base(db)
 {
     // NOOP
 }
示例#22
0
 public DirectoryScraper(PayolaContext ctx, string path)
     : base(ctx, path)
 {
 }