Example #1
0
 /// <summary>
 /// Update sport event with provided sport event param based on document id
 /// </summary>
 /// <param name="sportEvent"></param>
 /// <returns></returns>
 internal static Task UpdateSportEvent(SportEvent sportEvent)
 {
     return(CrossCloudFirestore.Current
            .Instance
            .Collection(COLLETCTION_EVENT)
            .Document(sportEvent.DocumentId)
            .UpdateAsync(sportEvent));
 }
Example #2
0
 /// <summary>
 /// Add new sport event in firestore
 /// </summary>
 /// <param name="sportEvent">event to be added</param>
 /// <returns></returns>
 internal static Task AddSportEvent(SportEvent sportEvent)
 {
     return(CrossCloudFirestore
            .Current
            .Instance
            .Collection(COLLETCTION_EVENT)
            .AddAsync(sportEvent));
 }
Example #3
0
 internal static Task <IQuerySnapshot> GetSportEvents(SportEvent sportEvent)
 {
     return(CrossCloudFirestore.Current
            .Instance
            .Collection(COLLETCTION_EVENT)
            .WhereEqualsTo(ATTRIBUTE_USER_GROUPS_CREATOR, sportEvent.Creator)
            .WhereEqualsTo(ATTRIBUTE_DATE, sportEvent.Date)
            .WhereEqualsTo(ATTRIBUTE_LOCATION, sportEvent.Location)
            .LimitTo(1)
            .GetAsync());
 }