Enterprise WPF #4: Basic create, read, update, delete (CRUD)

preview_player
Показать описание
In this session, I teach you how to implement the remaining CRUD operations using test-first approach with MVVM. You will create new business layer api's with unit tests, add new functionality to the existing view-models, and refactor existing functionality to faciliate new expectations about the code and its behavior.

Code:

#wpf #mvvm #dcomengineering
Рекомендации по теме
Комментарии
Автор

1, 500 views for a technical video of 30 minutes in two months shows the popularity of your series. Thanks so much!

NigelStratton
Автор

Thank you so much for this. Your mvvm tutorials are the best! :D

Twisterzemun
Автор

Thanks for the latest update in this series, very useful content!

GaryEwanPark
Автор

Very good cleaver explanation, good structured lection. Thanks a lot.

xqmxnwo
Автор

Very nice tutorial. I am really liking it. Long gap between session 3 and 4. Glad to see you didn't just leave it with session 3

TrevorHackett
Автор

Thanks so mush, the series of videos is very useful. I have one question, something I was trying to do along with CRUD,
I wanted to implement a cancel button where text boxes are cleared and collection reverted to old values. Also I wanted to have confirmation message prior delete. I think both of them needs something .. a layer or a way to interfere the wiring between WPF UI and view model.

silviagendy
Автор

Thank you for this video. I am looking to understand the WPF MVVM more. I have a comment/question, using the latest code in your project, I don't see where you checking if a field is required, and if the length of the string is valid (ie. less than 200 chars for example). I am guessing that should go somewhere in the modelview, but not sure how you would add that or how you would display the errors on the view. I notices you have OnValidate method on the ViewModel class in the Windows project, but how do add validation rules for that method to get triggered?

mikealhayek
Автор

Are there all four CRUD operations in this video? Thanks

alijaljevo
Автор

Even after the video was uploaded 2 years ago, it is still usefull. Can you also create a video of deleting multiselected items?

noosart
Автор

There's another small bug in DeleteCustomer method. You shoud add if statement than checks SelectedCustomer to be not null at the top of the method. Otherwise you'll get an error trying to click Delete button when therese no SelectedCustomer.
P.S. Great tutorial!

konstantinyelisavenko
Автор

a problem occur when you start the app and select link addclient then you try to save or delete the current data it produced an error

josegzre
Автор

I discovered a bug in the SaveCustomerCommand  unit tests, if you comment out from the MainViewModel, the related unit test still pass.  I figured out a work around but I would like to see how you correct the error.

keithnelson
Автор

What happened to ActionCommand? In ep.03 you have CanExecuteChanged with add/remove and Now here, in ep.04 you deleted it, just leaving CanExecuteChanged (I know cause it's in interface). But you didn't say nothing about this? Can you explain?

wittttttt
Автор

Hi,

I don't quite understand why in MainViewModel - IsValid, you added the condition "SelectedCustomer == null ||". As I understand it, if the SelectedCustomer is null (not selected) then you shouldn't be able to do AddCustomer or UpdateCustomer, but in the program, you are letting it through. 

To me, it would make more sense to add "SelectedCustomer != null &&". I thought you would first check SelectedCustomer is not null, before checking the individual properties of SelectedCustomer.

Can you explain the reasoning? Thanks.

alanlamuk
Автор

can we use mvvm pattern for datagrid to get selected item

arpanasingh
Автор

how about when we have a lot of UserControl

steev
Автор

Thank you so much for this. I have Models: Customer, Address(conteind City, ZIP, Street), and I want to change customer address from customer view. How can I do it?
My Code First Database created correctly(relationShip), but how can I Create relation in View?

I hope in next videos you explain it.

MatejDujava