public override Rating Update(Rating obj)
        {
            using (var conn = _sqlLite.GetConnection())
            {
                var a = conn.Find<Rating>(obj.RatingID);
                a.UpdateModel(obj);
                conn.Update(a);

                return a;
            }
        }
        public override Rating Insert(Rating obj)
        {
            obj.DateCreated = DateTime.UtcNow;
            obj.RatingID = Guid.NewGuid().ToString();

            using (var conn = _sqlLite.GetConnection())
            {
                conn.Insert(obj);
            }

            return obj;
        }
        public void AddRiffRating(string riffId, string userId, float value)
        {
            var r = new RiffSharer.Models.Rating();

            r.RiffID = riffId;
            r.UserID = userId;
            r.Value = value;

            _rar.Insert(r);
        }
Exemple #4
0
 public void UpdateModel(Rating r)
 {
     UserID = r.UserID;
     RiffID = r.RiffID;
     Value = r.Value;
 }