An open API service indexing awesome lists of open source software.

https://github.com/brianlparker/blazorwasmodata


https://github.com/brianlparker/blazorwasmodata

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

          

Install Odata on the server:
```
NuGet\Install-Package Microsoft.AspNetCore.OData -Version 8.0.12
```

Install QuickGrid on the Client:
```
NuGet\Install-Package Microsoft.AspNetCore.Components.QuickGrid -Version 0.1.0-alpha.22351.1
```

`Program.cs`
```cs
builder.Services.AddControllers()
.AddOData(options => options.AddRouteComponents(routePrefix: "odata", GetEdmModel())
.Select()
.Filter()
.Expand()
.Count()
.OrderBy()
.SetMaxTop(maxTopValue: 200));
```

```cs
public static IEdmModel GetEdmModel()
{
ODataConventionModelBuilder builder = new ODataConventionModelBuilder();

builder.EntitySet(name: "BlobContainers")
.EntityType.HasKey(blobContainer => blobContainer.ContainerName);

return builder.GetEdmModel();
}
```