0
paul.harriman created
I need to access 3 entities that do not have a primary key. the access needed is read only. It looks like I can do it from reading the documentation, but I am having difficulties.
- I started out with Suite creating an entity with a key.
- Then went to the Domain and Contracts and removed the inheritance to Entity<Guid>/EntityDto<Guid>
- I changed the inheritance on the interfaces to the repos to: public interface IEdRepository : IRepository
- I removed all updates/inserts/getAsync(id)
- I got to the repositories and that's where the trouble started. I need to change the class from public class EfCoreEdRepository : EfCoreRepository<DataDbContext, Ed, Guid>, IEdRepository to something keyless.
For these entities i just need to show them in a grid and do some paging, filtering and advanced finds. So all I need is GetListAsync
1 Answer(s)
-
0
I might have found something that works
I changed the Entity to inherit from Entity<long>
added
[NotMapped] public override long Id { get { return 0; } protected set { } }
change the repo to public class EfCoreEdRepository : EfCoreRepository<DataDbContext, Ed>