public async Task <List <IUserMiniProfileDTO> > GetUserDTOsByNamesAsync(string name, string lastname) { var user = await webServices.GetUserMiniProfileDTOsAsync(); var ToBeRetrieved = user.Where(o => o.Name == name || o.LastName.ToLower() == lastname.ToLower() || $"{name.ToLower()}" == $"{o.Name.ToLower()} {o.LastName.ToLower()}").ToList(); return(ToBeRetrieved); }
public async void FriendRequestGenerator(IUserMiniProfileDTO From, int ToID) { var item = await webServices.GetUserMiniProfileDTOsAsync(); IUserProfile userProfile = await profileManager.LoadUserProfileFromIDAsync(ToID); var UserDTO = item.FirstOrDefault(o => o.ID == userProfile.ID); INotification notification = new Notification() { FromUser = From, ToUser = UserDTO, IsReacted = false, IsSeen = false }; await webServices.AddItemToDatabaseAsync <INotification>(notification, DataType.Notification); //TODO: Finish this off }
private async void MainPage_Load(object sender, EventArgs e) { ProfileDTOS = await WebServices.GetUserMiniProfileDTOsAsync(); LoadProfiles(ProfileDTOS, ProfilesPanel); }