interface instead of mapping one by one
hi all, im trying to use an interface to initialize common properties, for example INote that contains all common properties, and multiple classes will inherit from this INote, im trying to achieve something like : initialize once and can be used for all objects that inherit this INote interface
previously i was doing one by one mapping for each objects that have common properties and found out there are lots of duplication (some resource say better to do manual mapping that use a library like automapper)
so i try to do it using interface, but somehow even if a class inherit this INote i still can't do it like this :
Memo resource = QueryVariant(new NoteItem(), "memo");
LongNote longNote = QueryVariant(new NoteItem(), "longNote");
did i miss anything here?
previously i was doing one by one mapping for each objects that have common properties and found out there are lots of duplication (some resource say better to do manual mapping that use a library like automapper)
so i try to do it using interface, but somehow even if a class inherit this INote i still can't do it like this :
Memo resource = QueryVariant(new NoteItem(), "memo");
LongNote longNote = QueryVariant(new NoteItem(), "longNote");
did i miss anything here?