mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Fix selecting logo to remove.
This commit is contained in:
@@ -334,7 +334,9 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
CompanyLogo companyLogo = await _context.CompanyLogos.FindAsync(id);
|
||||
CompanyLogo companyLogo = await _context.CompanyLogos.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if(companyLogo == null) return NotFound();
|
||||
|
||||
_context.CompanyLogos.Remove(companyLogo);
|
||||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction(nameof(Index));
|
||||
|
||||
Reference in New Issue
Block a user