Esempio n. 1
0
 /// <summary>
 /// Updates the database table row that matches the primary key of the provided entity with the entity property values
 /// </summary>
 /// <param name="entity">The entity object for performing the update</param>
 public static void Update(T entity)
 {
     using (var manager = new DotEntityQueryManager())
     {
         manager.DoUpdate(entity);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Updates the database table row that matches the provided <paramref name="where"/> expression
 /// </summary>
 /// <param name="entity">A dynamic object containing the fields to be updated with their new values</param>
 /// <param name="where">The filter expression to select appropriate database rows to update. This translates to WHERE clause in SQL</param>
 public static void Update(object entity, Expression <Func <T, bool> > where)
 {
     using (var manager = new DotEntityQueryManager())
     {
         manager.DoUpdate(entity, where);
     }
 }