public MyClass(IMyService myService) { if (myService != null) { CreateMap <MyClass1, MyClass2>() .ForMember(dest => dest.Message, option => option.MapFrom(src => myService.DoSomething())); } }
public ActionResult Index() { ViewBag.Message = "Welcome to my dogmatic wcf implemantation with castle windsor and ASP.NET MVC!"; ViewBag.MyProperty = _service.DoSomething(new MyDto { MyProperty = "Testing" }); return(View()); }
public void DoSomething() { _myService.DoSomething(); }
public override void OnActionExecuting(ActionExecutingContext filterContext) { _myService.DoSomething(); base.OnActionExecuting(filterContext); }