コード例 #1
0
        //
        // GET: /Opportunity/

        public ActionResult Index()
        {
            //we list all opportunities of the user from db, and pass them to the view
            string userName = this.User.Identity.Name;

            var opportunities = _opportunityService.ListOpportunitiesByCriteria(
                opportunity => opportunity.ResponsibleUser.UserName == userName);

            return(View(opportunities));
        }