Giter Site home page Giter Site logo

kevindockx / implementingadvancedrestfulconcernsaspnetcore3 Goto Github PK

View Code? Open in Web Editor NEW
115.0 8.0 90.0 35 KB

Fully functioning sample application accompanying my Implementing Advanced RESTful Concerns with ASP.NET Core 3 course

License: MIT License

C# 100.00%

implementingadvancedrestfulconcernsaspnetcore3's Introduction

implementingadvancedrestfulconcernsaspnetcore3's People

Contributors

kevindockx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

implementingadvancedrestfulconcernsaspnetcore3's Issues

XmlDataContractSerializer middleware fails for Dictionary<string, object>

Lesson 34. Demo - Implementing HATEOAS Support After POSTing)
Issue : change Accept Media type to application/xml

AddXmlDataContractSerializerFormatters middleware fails while serializing generated response for Dictionary<string, object>

In our case when we add links to Dictionary<string, object> for media-type *Accept: application/xml.

here are my dictionary's keys and values

Key1            value1
someKey1     someValue
key2             value2
someKey2     ICollection<TSource>

Serialization of this dictionarty response fails for media-type *Accept: application/xml.

Error on shaping collection resource

If I shape an author and don´t include the id field, it throw an exception on AuthorsController/GetAuthors on this block because the authorAsDictionary does´t have the id field:

var shapedAuthorsWithLinks = shapedAuthors.Select(author => { var authorAsDictionary = author as IDictionary<string, object>; var authorLinks = CreateLinksForAuthor((Guid)authorAsDictionary["Id"], null); authorAsDictionary.Add("links", authorLinks); return authorAsDictionary; });

I´m trying to figure out how to fix it. Some help?

CS0411 C#

Apply Sort Function

CourseLibrary.API.Helpers
IQueryableExtensions
Apply SortFunction
CS0411 C# The type arguments for method cannot be inferred from the usage. Try specifying the type arguments explicitly.

New property in Author (XML/Input) not Binding

Hi @KevinDockx
I added a new property in CreateAuthorRequest named City and the same in XML request and this City is not binding when I inspect in Controller. (please check 2 attached screenshots)

It works if we choose media type, : application/json but it doesn't work with XML input

image

image

Hi Kevin!!Could you please post an example of Cache Expiration and Validation!!

wrt to retail scenario ie. an client app (angular) collecting product summary from API
demarcation of data is mostly as is derived from real world retail producr , consider Laptop and its supported Accessories wrt to multiple brands API supports.
ques is how to ensure reliability of data sent in response from API endpoint via a Httpget (api/Laptops/GetProducts?fields=Id)
is maximum mostly considering nature of data , resource representation may be different for each Vendor.

Replace/remove PropertyMappingService

Hi @KevinDockx ,
I'm just curious if you see a problem to remove or change the PropertyMappingService since we got the same information in AutoMapper.
May-be, there is a way to utilize "mapper.ConfigurationProvider.Internal().GetAllTypeMaps()" instead of mapping all properties twice - once in profiles and once in PropertyMappingService.

Michael

IHttpContextAccessor Error

An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Marvin.Cache.Headers.IStoreKeyAccessor Lifetime: Transient ImplementationType: Marvin.Cache.Headers.StoreKeyAccessor': Unable to resolve service for type 'Microsoft.AspNetCore.Http.IHttpContextAccessor' while attempting to activate 'Marvin.Cache.Headers.StoreKeyAccessor'.)
Unable to create an object of type 'CourseLibraryContext'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.