Migrate from Code Fluent to Entity Framework (.net)

26 Views Asked by At

I have a project done with Code Fluent and i want to change it with entity framework and so i want your help so i can convert this specific line

var authorizations = AuthorizationCollection.LoadAll(userId, companyId, subscriberId).ToList();

I did this as a start

   var authorizations = context.Authorization 

but then what i need to do with the function and thanks

1

There are 1 best solutions below

0
Daniel Struthers On

Did you add the dbset to you context.cs file?

Something like var authorizations = context.Authorization.Where(x=>x.SubscriberId == subscriberId && x.UserId == userId && x.CompanyId == companyId).ToList()