本文整理汇总了C#中Core.DeleteRecord方法的典型用法代码示例。如果您正苦于以下问题:C# Core.DeleteRecord方法的具体用法?C# Core.DeleteRecord怎么用?C# Core.DeleteRecord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core
的用法示例。
在下文中一共展示了Core.DeleteRecord方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteLog
public static void DeleteLog(Database db, Core.Data.Log lg)
{
List<Core.Data.LogImage> gcil = GetLogImages(db, lg.ID);
foreach (var wp in gcil)
{
wp.DeleteRecord();
db.LogImageCollection.Remove(wp);
}
lg.DeleteRecord();
db.LogCollection.Remove(lg);
}
示例2: DeleteGeocache
public static void DeleteGeocache(Core.Data.Geocache gc)
{
List<Core.Data.Waypoint> wpl = GetWaypointsFromGeocache(gc.Database, gc.Code);
foreach(var wp in wpl)
{
wp.DeleteRecord();
gc.Database.WaypointCollection.Remove(wp);
}
List<Core.Data.UserWaypoint> uwpl = GetUserWaypointsFromGeocache(gc.Database, gc.Code);
foreach (var wp in uwpl)
{
wp.DeleteRecord();
gc.Database.UserWaypointCollection.Remove(wp);
}
List<Core.Data.GeocacheImage> gcil = GetGeocacheImages(gc.Database, gc.Code);
foreach (var wp in gcil)
{
wp.DeleteRecord();
gc.Database.GeocacheImageCollection.Remove(wp);
}
List<Core.Data.Log> lgs = GetLogs(gc.Database, gc.Code);
foreach (var wp in lgs)
{
DeleteLog(gc.Database, wp);
}
gc.DeleteRecord();
gc.Database.GeocacheCollection.Remove(gc);
}