Base solution for your next web application
Open Closed

PhoneBook tutorial - how about Update? functionality #2077


User avatar
0
dparizek created

HI:

The tutorial here almost represents a full CRUD application except there is no Update People functionality.

<a class="postlink" href="https://aspnetzero.com/Documents/Developing-Step-By-Step">https://aspnetzero.com/Documents/Develo ... ep-By-Step</a>

If someone can give me example code to create the UpdatePersonInput and UpdatePerson method for the PersonAppService then I would be happy to add to the tutorial, edit it in general for English readability, and submit PR.

I am a newbie to ASP.NET in general and sadly not sure I can write best example code, so asking here for it.

Then the tutorial will be complete example of a full CRUD app. (-:

Thanks!


17 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    We will definitely consider this. Can you create an issue for this here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-samples/issues">https://github.com/aspnetzero/aspnet-ze ... les/issues</a>.

    Thank you very much.

  • User Avatar
    0
    dparizek created

    Actually the rest of the application has plenty of examples of full CRUD, like for users for example, so I was just being stupid.

  • User Avatar
    0
    dparizek created

    Well update... looking at example code for Users or Editions or Friendships, I see they work somewhat differently. Instead of having a repo object that is queried via Linq? they have an additional concept of a Manager. Like UserManager.

    Is there somewhere this is documented? The detailed how to documents for each of the different starting apps don't seem to talk about Managers.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi David,

    You can think Managers as Domain Services. If you have some domain logic while interacting with your entities, you can use domain services. <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Domain-Services">http://aspnetboilerplate.com/Pages/Docu ... n-Services</a>

    If you just want to do simple crud operations, then you can use repositories. <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Repositories">http://aspnetboilerplate.com/Pages/Docu ... positories</a>

    I hope this helps. Thanks.

  • User Avatar
    0
    dparizek created

    Helps a ton! Thanks!!

  • User Avatar
    0
    robdocherty created

    I would like to echo the opinion expressed here. The step-by-step guide is great for helping new users get up and running quickly but it really NEEDS a simple entity update sample code added. This is a major omission. Surely not a big task to add simple update function on the Person entity? thanks.

  • User Avatar
    0
    robdocherty created

    Specifically having trouble working out how to configure the "create or edit" modal in the angular app. This requires a dto to get the selected item to edit? What else. There is really quite a lot left out here that is important and slowing me down to get started. I cannot really understand why a "step-by-step development guide" has "C", "R", "D" and no "U". It is a fundamental requirement.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Actually we thought the pages in downloaded template contains update operations and it would be enough but maybe we are wrong.

    We will consider adding update samples in step by step documents.

    Thanks for sharing your problem with us.

  • User Avatar
    0
    hugol created

    <cite>ismcagdas: </cite> Hi,

    Actually we thought the pages in downloaded template contains update operations and it would be enough but maybe we are wrong.

    We will consider adding update samples in step by step documents.

    Thanks for sharing your problem with us.

    Do you have any feedback on this subject? Would be nice to see an example implementing the Update for the main entity. New users that are using your framework to also learn some new skills struggle a bit with this part.

    Thanks.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I have created an issue for this, see <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-samples/issues/7">https://github.com/aspnetzero/aspnet-ze ... s/issues/7</a>. We will prepare it after releasing next version of AspNet Zero. So probably it will be next week or the one after that.

    Thanks.

  • User Avatar
    0
    affern created

    I also would appreciate an "best practice" example of update an entity :-)

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks @affern,

    We will make it's priority higher.

  • User Avatar
    0
    dparizek created

    I would like to bring attention to this request once again. Between Boilerplate, Module Zero, and AspNet Zero -and given the examples generally use custom DTO's (e.g. Users) and Managers inherited from ABP, and simple Dto's versus FullAuditedEntity DTO's, Stores??? where Stores documented??? etc etc etc. -- the level of complexity and different ways to do it is a lot for a newbie to handle.

    I cannot get a simple CRUD app using jTables up and going - something like the Users jTable pages but that doesn't have to have a UserManager and what is UserStore?? and Roles, Editions same complexity. Granted I am C# and ASP.NET newbie, but I have many years experience with Django/Django REST Framework/ Angular 1 successfully building significant web apps. More tutorials and documentation is needed more than more new ANZ features.

    And while the Users/Roles etc examples are complex, they also don't show how to connect in those things.

    So this is what is needed:

    jTable views like with User - of a ToDo app. ToDo should NOT connect to new Persons model, but instead to real, authenticated application Users. Full audited entities should be used. Then show how to use CreateOrEdit modals to get full CRUD, including Update, of ToDo items that include the User who created them. Show how to use FullAudited Dtos too - Users/Roles/Editions don't even use the FullAudited functionality, right?

  • User Avatar
    0
    dparizek created

    Actually I have jTable example CRUD now finally working for an issue tracker app. At least for basic fields, still need add in User better, and connect in Actions on Issues. I think this would make a great tutorial / learning app. I volunteer to write an extensive tutorial and contribute the code back to AspNetZero examples github repo if ANZ developers will review it and suggest changes for best practice - because I am probably not doing it the best way. And ANZ developers might also need to answer a question or two offline via email for me to get it done... else then such a tutorial could make it a lot easier for future newbies (-:

    Would there be interest in that?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @dparizek,

    We were discussing your suggestion but if you like to prepare such a document, we will be very happy. You can send your questions to <a href="mailto:[email protected]">[email protected]</a> and we will be happy to answer.

    Thanks.

  • User Avatar
    0
    cellero created

    I agree there is missing information in the tutorial. I have been stuck for too long now on the "Update" of Person.
    "First of all, we create needed Dto's that transfers people's id, name, surname and e-mail. Then create the functions in PersonAppService for editing"

    The tutorial should provide go into detail in this. I have tried to mimic another area of the template to get the missing information but have not had success. Very frustrating now.

    PS: I am using Angular template.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @cellero,

    It is already added, <a class="postlink" href="https://aspnetzero.com/Documents/Developing-Step-By-Step-Angular#edit-mode-for-people">https://aspnetzero.com/Documents/Develo ... for-people</a>. Do you mean something else ?