-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI voor het toevoegen van Genre's #9
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NicoVermeir
requested changes
Nov 19, 2019
Nico,
ik denk dat ik iets fout gedaan heb bij het aanpassen van de code.
De bedoeling was om de bestaande pull request aan te passen, maar blijkbaar
is er een 2e pull request gemaakt.
Hoe moet ik nu verder om het juist te doen?
Thorsten
Op di 19 nov. 2019 om 16:20 schreef NicoVermeir <notifications@github.com>:
… ***@***.**** requested changes on this pull request.
------------------------------
In Fletnix.Repositories/GenreRepository.cs
<#9 (comment)>:
> + public bool Create(Genre item)
+ {
+ try
+ {
+ var context = new FletnixContext();
+ context.Genre.Add(item);
+ context.SaveChanges();
+
+ return true;
+ }
+ catch (Exception)
+ {
+ return false;
+
+ }
+
Overbodige whitespace verwijderen
------------------------------
In Fletnix.Repositories/GenreRepository.cs
<#9 (comment)>:
> + class GenreRepository : IRepository<Genre>
+ {
+ public bool Create(Genre item)
+ {
+ try
+ {
+ var context = new FletnixContext();
+ context.Genre.Add(item);
+ context.SaveChanges();
+
+ return true;
+ }
+ catch (Exception)
+ {
+ return false;
+
overbodige whitespace
------------------------------
In Fletnix.Services/GenreService.cs
<#9 (comment)>:
> @@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Fletnix.Model;
+using Fletnix.Repositories;
+
+namespace Fletnix.Services
+{
+ class GenreService : IGenreService
+ {
+ private readonly IRepository<Genre> _genreRepository;
+
teveel whitespace
------------------------------
In Fletnix.Services/IGenreService.cs
<#9 (comment)>:
> @@ -0,0 +1,15 @@
+using Fletnix.Model;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Fletnix.Services
+{
+ public interface IGenreService
+ {
+ IList<Genre> GetGenres();
+
+ void SaveGenre(Genre item);
+
whitespace
------------------------------
In Fletnix/Messages/GenreCreatedMessage.cs
<#9 (comment)>:
> @@ -0,0 +1,16 @@
+using Fletnix.Model;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Fletnix.Messages
+{
+ public class GenreCreatedMessage
+ {
+ public Genre NewGenre { get; set; }
+ public GenreCreatedMessage(Genre newGenre)
hier mag een whitespace voor komen
------------------------------
In Fletnix/ViewModel/CreateGenreViewModel.cs
<#9 (comment)>:
> + public RelayCommand AddGenreCommand => _addGenreCommand ??= new RelayCommand(AddGenre);
+
+ public string Name
+ {
+ get => _name;
+ set
+ {
+ _name = value;
+ }
+ }
+
+ public CreateGenreViewModel(IGenreService genreService)
+ {
+ _genreService = genreService;
+ NewGenre = new Genre();
+
whitespace
------------------------------
In Fletnix/ViewModel/MainViewModel.cs
<#9 (comment)>:
> @@ -56,18 +57,28 @@ public MainViewModel(ICatalogService catalogService)
{
_catalogService = catalogService;
+
teveel whitespace
------------------------------
In Fletnix/ViewModel/MainViewModel.cs
<#9 (comment)>:
> //Catalog = _catalogService.GetMovies().ToList();
Catalog = new ObservableCollection<CatalogItem>(catalog);
+
teveel whitespace
------------------------------
In Fletnix/ViewModel/MainViewModel.cs
<#9 (comment)>:
> private void OnCatalogItemCreated(CatalogItemCreatedMessage message)
{
Catalog.Add(message.NewCatalogItem);
}
+
+
teveel whitespace
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9?email_source=notifications&email_token=AKMMAHUPJR2ZVLKRWZDYKNLQUP74BA5CNFSM4JO2CG6KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCMCVH3Y#pullrequestreview-319116271>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKMMAHVC4BU2LWDOWRMQ67TQUP74BANCNFSM4JO2CG6A>
.
|
laat maar zo staan, mooi voorbeeld om maandag in de les te bekijken |
reverts dbconnectionstring
NicoVermeir
approved these changes
Nov 25, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.