当前位置: 首页>>代码示例>>C#>>正文


C# DbConnection.Delete方法代码示例

本文整理汇总了C#中System.Data.Common.DbConnection.Delete方法的典型用法代码示例。如果您正苦于以下问题:C# DbConnection.Delete方法的具体用法?C# DbConnection.Delete怎么用?C# DbConnection.Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Data.Common.DbConnection的用法示例。


在下文中一共展示了DbConnection.Delete方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Delete

 public void Delete(int id)
 {
     using (_connection = Utilities.Database.GetProfiledOpenConnection())
     {
         _connection.Delete<TwitterApp>(id);
     }
 }
开发者ID:jdehlin,项目名称:Twitta,代码行数:7,代码来源:TwitterAppRepository.cs

示例2: Delete

 public void Delete(int id)
 {
     using (_connection = Utilities.GetProfiledOpenConnection())
     {
         _connection.Delete<Vote>(id);
     }
 }
开发者ID:ericdc1,项目名称:whatsforlunch,代码行数:7,代码来源:VoteRepository.cs

示例3: Delete

 public RestaurantType Delete(RestaurantType entity)
 {
     using (_connection = Utilities.GetProfiledOpenConnection())
     {
        _connection.Delete(entity);
     }
     return entity;
 }
开发者ID:ericdc1,项目名称:whatsforlunch,代码行数:8,代码来源:RestaurantTypeRepository.cs

示例4: Delete

 public Veto Delete(Veto entity)
 {
     using (_connection = Utilities.GetProfiledOpenConnection())
     {
         _connection.Delete(entity);
     }
     return entity;
 }
开发者ID:ericdc1,项目名称:whatsforlunch,代码行数:8,代码来源:VetoRepository.cs

示例5: Delete

 public ActionResult Delete(int id)
 {
     using (_connection = Utilities.GetOpenConnection())
     {
         _connection.Delete<User>(id);
     }
     return RedirectToAction("index");
 }
开发者ID:lancscoder,项目名称:Dapper.SimpleCRUD,代码行数:8,代码来源:UserController.cs

示例6: Delete

 public Holiday Delete(Holiday entity)
 {
     using (_connection = Utilities.GetProfiledOpenConnection())
     {
         _connection.Delete(entity);
     }
     return entity;
 }
开发者ID:ericdc1,项目名称:whatsforlunch,代码行数:8,代码来源:HolidayRepository.cs

示例7: Delete

 public JobLog Delete(JobLog entity)
 {
     using (_connection = Utilities.GetProfiledOpenConnection())
     {
         _connection.Delete(entity);
     }
     return entity;
 }
开发者ID:ericdc1,项目名称:whatsforlunch,代码行数:8,代码来源:JobLogRepository.cs

示例8: Delete

 public ActionResult Delete(string id)
 {
     using (_connection = Utilities.GetOpenConnection())
     {
         _connection.Delete<GUIDTestViewModel>(id);
     }
     return RedirectToAction("index");
 }
开发者ID:ChrisMalherbe,项目名称:Dapper.SimpleCRUD,代码行数:8,代码来源:GUIDTestController.cs


注:本文中的System.Data.Common.DbConnection.Delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。