Simplification Changes by Darkace01 · Pull Request #1 · binarythistle/S03E02---.NET-Core-3.1-MVC-REST-API · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
434 changes: 434 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

42 changes: 12 additions & 30 deletions Controllers/CommandsController.cs
4 changes: 3 additions & 1 deletion Data/SqlCommanderRepo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public void CreateCommand(Command cmd)
}

_context.Commands.Add(cmd);
SaveChanges();
}

public void DeleteCommand(Command cmd)
Expand All @@ -31,6 +32,7 @@ public void DeleteCommand(Command cmd)
throw new ArgumentNullException(nameof(cmd));
}
_context.Commands.Remove(cmd);
SaveChanges();
}

public IEnumerable<Command> GetAllCommands()
Expand All @@ -50,7 +52,7 @@ public bool SaveChanges()

public void UpdateCommand(Command cmd)
{
//Nothing
SaveChanges();
}
}
}
17 changes: 0 additions & 17 deletions Dtos/CommandCreateDto.cs

This file was deleted.

40 changes: 40 additions & 0 deletions Dtos/CommandDto.cs
12 changes: 0 additions & 12 deletions Dtos/CommandReadDto.cs

This file was deleted.

17 changes: 0 additions & 17 deletions Dtos/CommandUpdateDto.cs

This file was deleted.

Binary file modified obj/Debug/netcoreapp3.1/Commander.assets.cache
Binary file not shown.