This commit is contained in:
mborzyszkowski 2020-11-08 13:24:25 +01:00
parent 78707bf3c5
commit 3a64467661
3 changed files with 0 additions and 3 deletions

View File

@ -157,7 +157,6 @@ namespace InternshipSystem.Api.Controllers
return Conflict();
}
Context.Editions.Attach(editionToDelete);
Context.Editions.Remove(editionToDelete);
await Context.SaveChangesAsync(token);
return Ok();

View File

@ -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");

View File

@ -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");