Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 56 characters in body
Source Link
Alfer
  • 509
  • 3
  • 13

I have collection of documents Users

User { "Status": "ACTIVE", "Login": { "UserName": "login", "Password": null, "CreationDate": "2011-12-07T11:30:24.4062500Z", "Roles": [ { "Id": "roles/WebUser", "Name": "WebUser" }, { "Id": "roles/Admin", "Name": "Admin" } ] }, } 

How can i make a query to get list of users with role name "WebUser" except users with role name "Admin" (Contains role "WebUser" but not contains role "Admin")

Using LINQ or lucene

I have collection of documents Users

User { "Status": "ACTIVE", "Login": { "UserName": "login", "Password": null, "CreationDate": "2011-12-07T11:30:24.4062500Z", "Roles": [ { "Id": "roles/WebUser", "Name": "WebUser" }, { "Id": "roles/Admin", "Name": "Admin" } ] }, } 

How can i make a query to get list of users with role name "WebUser" except users with role name "Admin"

Using LINQ or lucene

I have collection of documents Users

User { "Status": "ACTIVE", "Login": { "UserName": "login", "Password": null, "CreationDate": "2011-12-07T11:30:24.4062500Z", "Roles": [ { "Id": "roles/WebUser", "Name": "WebUser" }, { "Id": "roles/Admin", "Name": "Admin" } ] }, } 

How can i make a query to get list of users with role name "WebUser" except users with role name "Admin" (Contains role "WebUser" but not contains role "Admin")

Using LINQ or lucene

Source Link
Alfer
  • 509
  • 3
  • 13

RavenDB query NOT contains

I have collection of documents Users

User { "Status": "ACTIVE", "Login": { "UserName": "login", "Password": null, "CreationDate": "2011-12-07T11:30:24.4062500Z", "Roles": [ { "Id": "roles/WebUser", "Name": "WebUser" }, { "Id": "roles/Admin", "Name": "Admin" } ] }, } 

How can i make a query to get list of users with role name "WebUser" except users with role name "Admin"

Using LINQ or lucene