コード例 #1
0
 public IActionResult CreateTrail(Trail form)
 {
     if (tr == null)
     {
         tr = new TrailFactory();
     }
     tr.Add(form);
     return(RedirectToAction("Index"));
 }
コード例 #2
0
        public IActionResult Index()
        {
            if (tr == null)
            {
                tr = new TrailFactory();
            }
            IEnumerable <Trail> found = tr.FindAll();

            ViewBag.TrailList = found;
            return(View());
        }
コード例 #3
0
        public IActionResult Trail(int id)
        {
            if (tr == null)
            {
                tr = new TrailFactory();
            }
            Trail found = tr.FindByID(id);

            ViewBag.Trail = found;
            return(View());
        }
コード例 #4
0
 public HomeController()
 {
     //Instantiate a UserFactory object that is immutable (READONLY)
     //This establishes the initial DB connection for us.
     trailFactory = new TrailFactory();
 }
コード例 #5
0
 public NewTrailController()
 {
     trailFactory = new TrailFactory();
 }
コード例 #6
0
 public HomeController(TrailFactory connect)
 {
     trailFactory = connect;
 }
コード例 #7
0
 public HomeController(TrailFactory uFactory)
 {
     _TrailFactory = uFactory;
 }
コード例 #8
0
 public LostInTheWoodsController()
 {
     trailFactory = new TrailFactory();
 }
コード例 #9
0
 //constructor
 public HomeController()
 {
     _dapperTrail = new TrailFactory();
 }
コード例 #10
0
 public HomeController(TrailFactory tf)
 {
     trailFactory = tf;
 }
コード例 #11
0
 public HomeController(TrailFactory tFactory)
 {
     _trailFactory = tFactory;
 }
コード例 #12
0
 public TrailController(TrailFactory trail)
 {
     trailFactory = trail;
 }
コード例 #13
0
 public HomeController(TrailFactory trailConnect)
 {
     trailFactory = trailConnect;
 }
コード例 #14
0
 public TrailController(TrailFactory tf)
 {
     trailfactory = tf;
 }
コード例 #15
0
 public TrailsController(DbConnector connect)
 {
     trailFactory = new TrailFactory();
 }
コード例 #16
0
ファイル: TrailController.cs プロジェクト: amalfushi/C-Sharp
 public TrailController()
 {
     _trailFactory = new TrailFactory();
 }
コード例 #17
0
 public HomeController()
 {
     trailFactory = new TrailFactory();
 }
コード例 #18
0
 public TrailsController(TrailFactory tFactory)
 {
     _trailFactory = tFactory;
 }