Need some advice about general idea of abstract BaseCrudService

  softwareengineering

The introduction is a little long, I apologize.

Intro: I have been working as a Fullstack dotnet angular developer for 3 consecutive years. During that period I had to write a lot of services (service classes) that would do basic crud operations with a little extra business logic change, and I believe there are many like me.

Coming to the point: As a very lazy person and developer, I could not stand the repetition and tried writing (I could not find a ready package that satisfied me) an abstract class that implements basic operations without being tied to the type of an entity (thanks to c# generics) and inherited every service class from it, getting rid of some portions of my repetitive codes. There I came to the conclusion that it is not that bad of an idea regarding performance loss of some 100 milliseconds is only a little concern for most of my tasks.

What I want: Although I have been using this “technique” in my production project (active users count less than 10k) for more than a year, I have some doubts about the general idea itself. So I want community experts’ opinions and advice about the idea.

I am also thinking about publishing this as a Nuget package if I receive positive feedback (after some modifications); therefore, I tried to write the code as clean and professionally as I could.

Please provide me with feedback about the concept and pros and cons. It would be wonderful to hear the different opinions about my work.

https://github.com/InomjonIsmaylov/BaseCrud/issues/1 https://github.com/InomjonIsmaylov/BaseCrud/discussions/2

I am already using this thing in my production projects and it is working very nicely.

Just answering like it is a wrong idea because of this and that is also somewhat helpful.

New contributor

Inomjon Ismaylov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT