コード例 #1
0
        public IActionResult Index()
        {
            //_db.Set<Project>().Add(new Project() { Name = "pr1"});
            _appService.AddProject(new Domain.Entities.Project()
            {
                Name = "pr1"
            });
            var proj = _appService.GetAllProjects();

            if (proj.Count != 0)
            {
                ViewBag.Proj = proj;
            }
            else
            {
                ViewBag.Proj = new List <Project>()
                {
                    new Project()
                    {
                        Name = "empty"
                    }
                };
            }

            return(View());
        }