public Ekreta.Mobile.Core.Models.Rating IncreaseAttempts(Profile profile) { Ekreta.Mobile.Core.Models.Rating rating = this.GetRatingByProfile(profile) ?? new Ekreta.Mobile.Core.Models.Rating(); rating.LastSeenDate = DateTime.Now; ++rating.SeenCount; this.AddOrUpdate(profile, rating); return(rating); }
public Ekreta.Mobile.Core.Models.Rating Init(Profile profile, bool firebaseConfigChanged) { Ekreta.Mobile.Core.Models.Rating rating = this.GetRatingByProfile(profile); if (rating == null) { rating = new Ekreta.Mobile.Core.Models.Rating() { LastSeenDate = DateTime.Now.AddDays((double)-this.CancelIdleDays) }; this.AddOrUpdate(profile, rating); } else if (firebaseConfigChanged) { rating.LastSeenDate = DateTime.Now.AddDays((double)-this.CancelIdleDays); this.AddOrUpdate(profile, rating); } return(rating); }
public void AddOrUpdate(Profile profile, Ekreta.Mobile.Core.Models.Rating rating) { rating.ProfileId = profile.RolelessId; this._ratingRepository.AddOrUpdate(rating); }