protected override void Add1ToNRelation(IRelationAdditionOptions options) { IRelationSideAdditionOptions relationAdditionOptions = RelationAdditionOptions.GetPropertyForTo(options, "Guid"); PropertyAdditionOptions propertyAdditionOptions = new PropertyAdditionOptions(relationAdditionOptions); this.apiPropertyAddition.AddPropertyToDTO(propertyAdditionOptions, ApiProjectGeneration.DomainFolder, FileName); }
protected override void Add1ToNRelation(IRelationAdditionOptions options) { IRelationSideAdditionOptions guidPropertyOptions = RelationAdditionOptions.GetPropertyForTo(options, "Guid"); PropertyAdditionOptions propertyAdditionOptions = new PropertyAdditionOptions(guidPropertyOptions); this.propertyAddition.AddPropertyToDTO(propertyAdditionOptions, LogicTestsProjectGeneration.DomainFolder, FileName); this.logicDbDtoTestMethodsAddition.Add(propertyAdditionOptions, LogicTestsProjectGeneration.DomainFolder, FileName); }
protected override void Add1ToNRelation(IRelationAdditionOptions options) { IRelationSideAdditionOptions toOptions = RelationAdditionOptions.GetPropertyForTo(options, "Guid"); PropertyAdditionOptions propertyAdditionOptions = new PropertyAdditionOptions(toOptions); this.frontendDtoPropertyAddition.AddPropertyToDTO(propertyAdditionOptions, ModelProjectGeneration.DomainFolder, FileName); this.frontendDtoPropertyMethodAddition.AddPropertyToDTO(propertyAdditionOptions, "fromApiEntity", "apiEntity", ModelProjectGeneration.DomainFolder, FileName); }
protected override void Add1ToNRelation(IRelationAdditionOptions options) { // To IRelationSideAdditionOptions relationSideAdditionOptions = RelationAdditionOptions.GetPropertyForTo(options, "Guid"); PropertyAdditionOptions propertyAdditionOptions = new PropertyAdditionOptions(relationSideAdditionOptions); this.dbTablePropertyAddition.AddProperty(propertyAdditionOptions, DBProjectGeneration.DomainFolder, FileName); this.dbTableRelationContraintAddition.AddContraint(options, DBProjectGeneration.DomainFolder, FileName); }
protected override void Add1ToNRelation(IRelationAdditionOptions options) { // To IRelationSideAdditionOptions guidPropertyOptions = RelationAdditionOptions.GetPropertyForTo(options, "Guid"); this.relationAddition.AddRelationToDTO(guidPropertyOptions, PersistenceTestsProjectGeneration.DomainFolder, FileName); PropertyAdditionOptions propertyAdditionOptions = new PropertyAdditionOptions(guidPropertyOptions); this.dbDtoTestMethodsAddition.Add(propertyAdditionOptions, PersistenceTestsProjectGeneration.DomainFolder, FileName); }
public void AddProperty(IPropertyAdditionOptions options) { if (!PropertyAdditionOptions.Validate(options)) { throw new OptionValidationException("Die Optionen sind nicht korrekt formatiert."); } foreach (ClassGeneration classGeneration in classGenerations) { classGeneration.PerformAddPropertyCommand(options); } }
public static void Perform(string[] args) { if (args.Length < 6) { Console.WriteLine("Bitte geben sie einen Domain Name an: contractor add property string:256 Name -e Bankwesen.Bank:Banken [-o | --optional]"); return; } var options = ContractorOptionsLoader.Load(Directory.GetCurrentDirectory()); var propertyOptions = new PropertyAdditionOptions(options); ParseOptions(propertyOptions, args); try { ContractorCoreApi contractorCoreApi = new ContractorCoreApi(); contractorCoreApi.AddProperty(propertyOptions); Console.WriteLine($"Property '{propertyOptions.PropertyName}' zur Entity '{propertyOptions.EntityName}' hinzugefügt'"); } catch (Exception e) { Console.WriteLine(e); } }
private static void AddBanken(ContractorOptions contractorOptions) { ContractorCoreApi contractorCoreApi = new ContractorCoreApi(); // Domain var domainAdditionOptions = new DomainAdditionOptions(contractorOptions) { Domain = "GegönntesBankwesen" }; contractorCoreApi.AddDomain(domainAdditionOptions); // Entities EntityAdditionOptions entityAdditionOptions = new EntityAdditionOptions(domainAdditionOptions) { EntityName = "GegönnteBank", EntityNamePlural = "GegönnteBanken" }; contractorCoreApi.AddEntity(entityAdditionOptions); // Properties PropertyAdditionOptions propertyAdditionOptions = new PropertyAdditionOptions(entityAdditionOptions) { PropertyType = PropertyTypes.String, PropertyName = "Name", PropertyTypeExtra = "256" }; contractorCoreApi.AddProperty(propertyAdditionOptions); propertyAdditionOptions = new PropertyAdditionOptions(entityAdditionOptions) { PropertyType = PropertyTypes.String, PropertyName = "GegönnterName", PropertyTypeExtra = "256" }; contractorCoreApi.AddProperty(propertyAdditionOptions); propertyAdditionOptions = new PropertyAdditionOptions(entityAdditionOptions) { PropertyType = PropertyTypes.Boolean, PropertyName = "GegönnterBoolean" }; contractorCoreApi.AddProperty(propertyAdditionOptions); propertyAdditionOptions = new PropertyAdditionOptions(entityAdditionOptions) { PropertyType = PropertyTypes.DateTime, PropertyName = "GegönntesDateTime", }; contractorCoreApi.AddProperty(propertyAdditionOptions); propertyAdditionOptions = new PropertyAdditionOptions(entityAdditionOptions) { PropertyType = PropertyTypes.Double, PropertyName = "GegönnterDouble" }; contractorCoreApi.AddProperty(propertyAdditionOptions); propertyAdditionOptions = new PropertyAdditionOptions(entityAdditionOptions) { PropertyType = PropertyTypes.Guid, PropertyName = "GegönnteGuid", }; contractorCoreApi.AddProperty(propertyAdditionOptions); propertyAdditionOptions = new PropertyAdditionOptions(entityAdditionOptions) { PropertyType = PropertyTypes.Integer, PropertyName = "GegönnterInteger" }; contractorCoreApi.AddProperty(propertyAdditionOptions); }