コード例 #1
0
        public static void Update(int id, DbEntityProduct dbEntity)
        {
            string columnsAndValues =
                $"ProductName='{dbEntity.ProductName}',ProductPrice='{dbEntity.ProductPrice}',Stock='{dbEntity.Stock}',UpdatedBy='{dbEntity.UpdatedBy}'";

            SqlCommandUpdate <DbEntityProduct> .Execute(dbEntity, tableName, id, columnsAndValues);
        }
コード例 #2
0
        public static void Update(int id, DbEntityClient dbEntity)
        {
            string columnsAndValues =
                $"Dni='{dbEntity.Dni}',Name='{dbEntity.Name}',UpdatedBy='{dbEntity.UpdatedBy}'";

            SqlCommandUpdate <DbEntityClient> .Execute(dbEntity, tableName, id, columnsAndValues);
        }
コード例 #3
0
        public static void Update(int id, DbEntityUser dbEntityUser)
        {
            string columnsAndValues =
                $"Dni='{dbEntityUser.Dni}',Name='{dbEntityUser.Name}',Lastname='{dbEntityUser.Lastname}'," +
                $"BirthDate='{dbEntityUser.BirthDate}',Address='{dbEntityUser.Address}',PhoneNumber='{dbEntityUser.PhoneNumber}'," +
                $"Email='{dbEntityUser.Email}',Username='******',Password='******',UpdatedBy='{dbEntityUser.UpdatedBy}'";

            SqlCommandUpdate <DbEntityUser> .Execute(dbEntityUser, tableName, id, columnsAndValues);
        }