[RESOLVED]Authorize Attribute

Hi All, 

I am writing my custom Authorize attribute..

but I need to initialize my service with two paramteres  which in turn calls the repository

How can I initialize service or repository ?

Please help 

Thanks

Hi,

gowrifor.net

How can I initialize service or repository ?

Can you show some relevant parts of your code? Are you using dependency injection? …

Grz, Kris.

gowrifor.net

I need to initialize my service with two paramteres

Do you mean to pass parameters to you custom Authorize attribute. In that case you can pass it as a parameter. Please take a look at this stack overflow post

create the authorize filter with parameter asp.net mvc

Leave a Reply