Ejemplo n.º 1
0
        public static bool Update(SetCategory c)
        {
            string sql = @"UPDATE [dbo].[Categories] SET [Name] = @p1, [Description] = @p2, [ByUser] = @p3, [OnDate] = @p4 WHERE Id = @p5";

            return(DB.Action(sql, c.Name, c.Description, c.ByUser, c.OnDate, c.Id));
        }
Ejemplo n.º 2
0
        public static bool Create(SetCategory c)
        {
            string sql = @"INSERT INTO [dbo].[Categories] ([Name], [Description], [ByUser])  VALUES (@p1, @p2, @p3)";

            return(DB.Action(sql, c.Name, c.Description, AccountDAO.Id));
        }