public static Model.Data.User PopulateExternalModel(this UserDocument source, string projectId, Model.Data.User target = null) { var user = source.PopulateExternalModel <UserDocument, Model.Data.User>(target); user.ProjectMemberships = user.ProjectMemberships.Where(m => m.ProjectId == projectId).ToList(); return(user); }
public static Model.Data.User PopulateExternalModel(this UserDocument source, Model.Data.User target = null) => source.PopulateExternalModel <UserDocument, Model.Data.User>(target);