Example #1
0
        public void Process(ExtendsAnnotation annotation)
        {
            var    extendedEntity = annotation.Value;
            string documentName   = resolver.GetDocumentFileName(extendedEntity);

            entityDocument.Imports.Add(documentName);
            entityDefinition.ExtendsEntity = new CdmEntityReference(entityDefinition.Ctx, extendedEntity, true);
        }
Example #2
0
        public void CdmEntityDefinitionCanExtendOtherCdmEntity()
        {
            var generator  = BuildCdmEntityGenerator();
            var annotation = new ExtendsAnnotation("Customer");
            var table      = new Table("SpecialCustomer")
                             .WithColumn("ID", SqlDbType.Int, isPrimaryKey: true)
                             .WithAnnotation(annotation);

            CdmEntityDefinition entity = generator.GenerateEntity(table);

            Assert.NotNull(entity.ExtendsEntity);
            Assert.Equal("Customer", entity.ExtendsEntity.NamedReference);
        }
Example #3
0
 public void Process(ExtendsAnnotation annotation)
 {
 }