Exemple #1
0
        /// <summary>
        /// Updates the specified entity.
        /// </summary>
        /// <returns>Nothing.</returns>
        /// <param name="entity">The updated Entity.</param>
        public void Update(T entity)
        {
            JoinResults[entity.Id] = entity;
            IDbCommand cmd = QueryProvider.GetUpdateCommand(entity, TableName, TableMapping);

            cmd.ExecuteNonQuery();
        }
Exemple #2
0
        /// <summary>
        /// Updates the specified entity.
        /// </summary>
        /// <returns>Nothing.</returns>
        /// <param name="entity">The updated Entity.</param>
        public void Update(T entity, params Expression <Func <T, dynamic> >[] updatedProperties)
        {
            JoinResults[entity.Id] = entity;
            IDbCommand cmd = QueryProvider.GetUpdateCommand(entity, TableName, TableMapping, updatedProperties);

            cmd.ExecuteNonQuery();
        }