Пример #1
0
 public MyClass(IMyService myService)
 {
     if (myService != null)
     {
         CreateMap <MyClass1, MyClass2>()
         .ForMember(dest => dest.Message, option => option.MapFrom(src => myService.DoSomething()));
     }
 }
Пример #2
0
        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());
        }
Пример #3
0
 public void DoSomething()
 {
     _myService.DoSomething();
 }
Пример #4
0
 public override void OnActionExecuting(ActionExecutingContext filterContext)
 {
     _myService.DoSomething();
     base.OnActionExecuting(filterContext);
 }