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

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

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

            return obj;
        }
Exemplo n.º 3
0
        public void AddRiffComment(string riffId, string userId, string text)
        {
            Comment c = new Comment();

            c.RiffID = riffId;
            c.UserID = userId;
            c.Text = text;

            _cr.Insert(c);
        }
Exemplo n.º 4
0
 public void UpdateModel(Comment c)
 {
     UserID = c.UserID;
     RiffID = c.RiffID;
     Text = c.Text;
 }