My Create, Update & DeleteCreate, Update and Delete methods should return a success and errors list depending up on the result. I want to avoid the out parameters in the method. Therefore I came up with an implementation of ResultModel class which gets returned for the above mentioned methods.
Question: Is my implementation elegant enough to go ahead with the real world project? Or there could be other ways to return the Result which are much better? Is my implementation elegant enough to go ahead with the real world project? Or could there be other better ways to return the result?
Here is the sample code which actually works. :) I have inserted comments in the code where I think is necessary.
Here is the Program ClassProgram class to call the above code for testing, it. It also has some helper methods which are mentioned in the MainMain function.
Edit: For validations, I will be using FluentValidation library. So, the Validations I have written here is just a sample (I didn't want to complicate this question's code). For validations, I will be using FluentValidation library. So, the validations I have written here is just a sample (I didn't want to complicate this question's code).