Refactor
This commit is contained in:
parent
78707bf3c5
commit
3a64467661
@ -157,7 +157,6 @@ namespace InternshipSystem.Api.Controllers
|
||||
return Conflict();
|
||||
}
|
||||
|
||||
Context.Editions.Attach(editionToDelete);
|
||||
Context.Editions.Remove(editionToDelete);
|
||||
await Context.SaveChangesAsync(token);
|
||||
return Ok();
|
||||
|
@ -163,7 +163,6 @@ namespace InternshipSystem.Api.Controllers
|
||||
return NotFound($"Internship type with id: {internshipTypeId} does not exist");
|
||||
}
|
||||
|
||||
Context.InternshipTypes.Attach(internshipTypeToDelete);
|
||||
Context.InternshipTypes.Remove(internshipTypeToDelete);
|
||||
await Context.SaveChangesAsync(cancellationToken);
|
||||
return Ok($"Internship type with id: {internshipTypeId} deleted successfully");
|
||||
|
@ -155,7 +155,6 @@ namespace InternshipSystem.Api.Controllers
|
||||
return NotFound($"Static page with access name: {accessName} does not exist");
|
||||
}
|
||||
|
||||
Context.StaticPages.Attach(pageToDelete);
|
||||
Context.StaticPages.Remove(pageToDelete);
|
||||
await Context.SaveChangesAsync(cancellationToken);
|
||||
return Ok($"Static page with access name: {accessName} deleted successfully");
|
||||
|
Loading…
Reference in New Issue
Block a user