Похожие чаты

Hi there. I am writing a migration engine for a

project with MongoDB. All models need to be inherited or valid with respect to some interface. Implemented like this (screen 1), similar is done in IEnumerable + IEnumerable <T>

But then the compiler swears that the property from the non-generalized IBaseModel is not implemented. How can I get out of the situation?

7 ответов

7 просмотров
Max- Автор вопроса
Max
screenshot

if you can, removing new keyword and object Id from ibase model

Max- Автор вопроса
ƒabio
if you can, removing new keyword and object Id fro...

Thx for reply. Unfortunately I can't. The non-generic interface is used in the internal logic. Reason : omit "Id" property type, it's not necessary for MongoDB Driver

Max- Автор вопроса
ƒabio
can you replace object with string?

Not sure. There can be a case when type of Id property is int or something else

implement the them explicitly something like string IBaseModel.Id => Id; https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/interfaces/explicit-interface-implementation

if you just press ctrl+. with the cursor on the underlined text, it doesn't give you the option?

Похожие вопросы

Обсуждают сегодня

Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
70
Здравствуйте. Задача состоит в том, чтобы сделать real-time чат в мобильном приложении. После передачи сообщения пользователем через веб-сокеты, для основного и долговременног...
🐾
5
Всем доброго дня, ребят подскажите пожалуйста, если в курсе по ассемблеру используется MASM32, могу ли я использовать FASM? В чем явная разница и будет ли у меня все работать?
Botsman
17
Добрый день, не подскажите, если в OC-V3 поменять страндартную директорию /storage/ на /storage2/ - не будет сильно много проблем ?
Max Dubovsky
32
падает джоба хотя уже была собрана на соседнем namespace, куда капать? │ │ Copying blob sha256:2fa066caddb8f09a71082b03aa43046f79346a01d9c89e06a1f508bb1207dba5 427 │ │ Copyin...
Andrei St
1
Conversation at a festival with a non-crpto person (not a normie by any stretch, though): * person: tell me about crypto, me: ok, the original idea is p2p sound money for the...
molecular#123 🐓
25
Хотел бы спросить у знающих, правильную ли я выбрал книгу для начала изучения ассемблера Юрова В.И ? Или есть более лучшие книги для начала обучения?
Botsman
25
Книга Юрова В.И пойдёт для обучения?
Botsman
24
$params = [ 'formid' => 'feedbackForm', 'formTpl' => '@CODE: <form class="form-validate" data-id="ajax_form"> <fieldset class="margin-bottom-md"> ...
Pathologic
1
Люди добрые, помогите с идеями, потому что свои закончились. У клиента падает софтина в момент инициализации модуля OtlEventMonitor на RegisterWindowMessage('Gp/OtlTaskEvents/...
Михаил Усков
7
Карта сайта