コード例 #1
0
        // GET: Organizations/Edit/5
        public async Task <IActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var organization = await _context.Organizations
                               .Include(o => o.Cause)
                               .SingleOrDefaultAsync(m => m.Id == id);

            OrganizationModel organizationModel = OrganizationModel.FromOrganization(_context, organization);

            if (organization == null)
            {
                return(NotFound());
            }
            return(View(organizationModel));
        }