UserFactoryFindAllByGuids Method |
Namespace: AskiaPortalCmn
public static IEnumerable<IUser> FindAllByGuids( IContext context, IEnumerable<Guid> guids, QueryAllFilter filter = QueryAllFilter.NotDeleted )
Find all users using a list of GUIDs.
var context = ContextFactory.CreateByUserGuid(Guid.Parse("20BE5F84-F006-49A0-9674-4B16A090AF2D")); var contextValidation = context.Validate(); if (!contextValidation.Success) { throw contextValidation.Exception; } var guids = new List<Guid> { Guid.Parse("9821219b-0768-41cc-81d8-cf3b1ade9317"), Guid.Parse("6d75653c-fe59-47ba-801c-f770df1acba6"), Guid.Parse("d7cf5c25-d34a-4374-bc1f-04f77b28a1ee") }; var users = UserFactory.FindAllByGuids(context, guids); foreach(IUser user in users) { Console.WriteLine($"User Id={user.Id}: {user.Name}"); }