public async Task VerifyMetadataPropertyType() { var api = new PrimitivesApi(); var edmModel = await api.GetModelAsync(); var entityType = (IEdmEntityType) edmModel.FindDeclaredType(@"Microsoft.Restier.EntityFramework.Tests.Models.Primitives.DateItem"); Assert.NotNull(entityType); Assert.True(entityType.FindProperty("DTProperty").Type.IsDateTimeOffset()); Assert.True(entityType.FindProperty("DateProperty").Type.IsDate()); Assert.True(entityType.FindProperty("TODProperty").Type.IsTimeOfDay()); Assert.True(entityType.FindProperty("TSProperty").Type.IsDuration()); }
public async Task VerifyMetadataPropertyType() { ApiConfiguration.AddPublisherServices<PrimitivesApi>(services => { services.AddODataServices<PrimitivesApi>(); }); var api = new PrimitivesApi(); var edmModel = await api.GetModelAsync(); var entityType = (IEdmEntityType) edmModel.FindDeclaredType(@"Microsoft.Restier.Providers.EntityFramework7.Tests.Models.Primitives.DateItem"); Assert.NotNull(entityType); Assert.True(entityType.FindProperty("DTProperty").Type.IsDateTimeOffset()); Assert.True(entityType.FindProperty("DateProperty").Type.IsDate()); Assert.True(entityType.FindProperty("TODProperty").Type.IsTimeOfDay()); Assert.True(entityType.FindProperty("TSProperty").Type.IsDuration()); }
public async Task VerifyMetadataPropertyType() { ApiConfiguration.AddPublisherServices <PrimitivesApi>(services => { services.AddODataServices <PrimitivesApi>(); }); var api = new PrimitivesApi(); var edmModel = await api.GetModelAsync(); var entityType = (IEdmEntityType) edmModel.FindDeclaredType(@"Microsoft.Restier.Providers.EntityFramework7.Tests.Models.Primitives.DateItem"); Assert.NotNull(entityType); Assert.True(entityType.FindProperty("DTProperty").Type.IsDateTimeOffset()); Assert.True(entityType.FindProperty("DateProperty").Type.IsDate()); Assert.True(entityType.FindProperty("TODProperty").Type.IsTimeOfDay()); Assert.True(entityType.FindProperty("TSProperty").Type.IsDuration()); }