با سلام
در مورد "تزریق وابستگی در فیلتر ها" مقاله ای با این عنوان هست و توضیحات کامل داده
چطور میتونم مشکل ایجاد شده رو رفع کنم؟
[Log]
public ActionResult Index()
{
retu View();
}public class LogAttribute : ActionFilterAttribute
{
private readonly IContainer _container;public LogAttribute(IContainer container)
{
_container = container;
}public override void OnActionExecuted(ActionExecutedContext filterContext)
{
_container.GetInstance<ILogActionService>().Log(". .....data......");
//LogActionService.Log("......data......");
base.OnActionExecuted(filterContext);
}
}
با تشکر
- - , .
برچسب:
نویسنده: محمد رضا جوادیان