Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for Marc.2377
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Answer | — |
A: Declaring interface members with generic return types: "The type parameter [generic type] cannot be used with type arguments" I believe an implementation of the answer by Peter Taylor above would be: ```cs public override EntityEntry Add([NotNullAttribute] TEntity entity) where TEntity : class { return Add(entity, base.Add); } public TEntityEntryTEntity Add([NotNullAttribute] TEntity entity, [NotNull... (more) |
— | about 3 years ago |
Question | — |
Declaring interface members with generic return types: "The type parameter [generic type] cannot be used with type arguments" I'm trying to write an interface to define the set of operations I expect my repositories' Unit of Work implementations to have, and I want this interface to be fulfilled by EF Core's `DbContext` class. So far this is what I got: (I know the name is awful, suggestions accepted): ```cs public i... (more) |
— | about 3 years ago |
Question | — |
How to separate DB query logic from the application other than implementing a repository on top of an ORM? I've been doing a lot of reading on implementing the repository pattern in C# projects and found controversy, or shall I say some strong criticism, made by seemingly very smart people with previous experience with the pattern, saying that one is better off not implementing a repository on top of an O... (more) |
— | about 3 years ago |