Skip to content
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

How to use Undelete function #2349

Closed
Nathan2020-0126 opened this issue Jun 1, 2017 · 2 comments
Closed

How to use Undelete function #2349

Nathan2020-0126 opened this issue Jun 1, 2017 · 2 comments

Comments

@Nathan2020-0126
Copy link

Why i try to undelete, it comes out a error information, 'The method or operation is not implemented'
I have add below code in XYZEndpointes.cs and XYZRepository.cs

[HttpPost, AuthorizeDelete(typeof(MyRow))]
        public UndeleteResponse Undelete(IUnitOfWork uow, UndeleteRequest request)
        {
            return new MyRepository().Undelete(uow, request);
        }
  public UndeleteResponse Undelete(IUnitOfWork uow, UndeleteRequest request)
        {
            return new MyUndeleteHandler().Process(uow, request);
        }
....
private class MyUndeleteHandler : UndeleteRequestHandler<MyRow> { }

What's the problem?

@sayuga
Copy link

sayuga commented Jun 2, 2017

undelete needs a few things.

  • Row.cs needs to have isActiveDeleteRow, IsActiveRow set to the class,
  • The table should have and IsActive Field
  • Repository and Endpoint must have a Undelete Handler.

If memory serves me right, I believe the UserRow uses a similar feature already in place. Look at the User module and look at it's LoggingRow

@Nathan2020-0126
Copy link
Author

Yes, thank you for your answer. after i add isActiveDeleteRow to XYZRow class. it is runing successfull.

And with your guiding, i find there is a LoggingRow which i just need it.

Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants