Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello. Sorry for my english/ I'm from Russia. I'm learn your aspnetboilerplate and i have a question. How can I use multi-page web application with aspnetboilerplate? Can you show me a little example? I mean that i coud not use appservice in controller.
Code:
C#
public ActionResult Dect()
        {
            _memberAppService = new MemberAppService(_memberRepository);
            var users = _memberAppService.GetMembersAll();

            ViewBag.users = users;

            return View("Dect");
        }

In MemberAppService class in function GetMemberAll() application reports about error than _memberAppService is null
Can you help me?
thanks in advance
Posted
Comments
Dakiny 26-Nov-14 5:43am    
This hyperlink content angularjs example, but I'm use Multi-Page Web Application.

1 solution

My solution
C#
public class MembersUsersController : SJMControllerBase
    {
        private MemberAppService _memberAppService;

        public MembersUsersController(MemberAppService memberAppService) {
            _memberAppService = memberAppService;
        }

        [HttpGet]
        public ActionResult MembersView()
        {
            var users = _memberAppService.GetMembersAll();

            ViewBag.users = users.Members;

            return View();
        }
    }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900