コード例 #1
0
        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;
            }
        }
コード例 #2
0
        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;
        }
コード例 #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);
        }
コード例 #4
0
ファイル: Comment.cs プロジェクト: Supermortal/RiffSharer
 public void UpdateModel(Comment c)
 {
     UserID = c.UserID;
     RiffID = c.RiffID;
     Text = c.Text;
 }