how to overload the += operator with the operands of different types (if possible)
- by Veer
Hi,
Instead of having an add() method in the repository, I would like to overload the += operator so that the expression
_repository += myModel;
will insert myModel into the database(after i submit changes)
I know that the objects of different type cannot be used in operator overloading. Still want to know if there is some alternate ways to accomplish this
Any help?