c# - How to get default value from web.config in webapi attribute routing parameter -


is possible attribute routing default parameter value web.config?

public class bookscontroller : apicontroller     {         [route("api/books/locale/{lcid:int?}")]         public ienumerable<book> getbooksbylocale(int lcid = <read web.config>) { ... }     } 

thanks

no cannot, lcid default variable must const value,

you can assign null, , logical inside controller assign variable web.config value.

hope


Comments