public void Delete(int Id) { var entity = Get(Id); if (entity != null) { _context.SbDelete(entity); _context.SaveChanges(); } }
public void Delete(int Id) { var menu = Get(Id); if (menu != null) { context.SbDelete(menu); context.SaveChanges(); } }
public void Delete(int id) { var jobTitle = Get(id); if (jobTitle != null) { context.SbDelete(jobTitle); context.SaveChanges(); } }
//public string GetTableName(dynamic objectName) //{ // //var tableName = context.Metadata.PersistentTypes.FirstOrDefault(typ => typ.FullName == objectName.GetType().FullName); // //return tableName != null ? tableName.Table.Name : null; // var entityName = objectName.GetType().Name; // var objectContext = ((IObjectContextAdapter)context).ObjectContext; // var storageMetadata = objectContext.MetadataWorkspace.GetItems<EntityContainerMapping>(DataSpace.CSSpace); // foreach (var ecm in storageMetadata) // { // EntitySet entitySet; // if (ecm.StoreEntityContainer.TryGetEntitySetByName(entityName, true, out entitySet)) // { // return entitySet.Name; // } // } // return null; //} public void Delete(int Id) { var OrgUnit = Get(Id); if (OrgUnit != null) { context.SbDelete(OrgUnit); context.SaveChanges(); } }
public void Delete(int Id) { var jobStatus = Get(Id); if (jobStatus != null) { context.SbDelete(jobStatus); context.SaveChanges(); } }
public void Delete(int Id) { var locclass = Get(Id); if (locclass != null) { context.SbDelete(locclass); context.SaveChanges(); } }
public void Delete(int Id) { var province = Get(Id); if (province != null) { context.SbDelete(province); context.SaveChanges(); } }
public void Delete(int Id) { var level = Get(Id); if (level != null) { context.SbDelete(level); context.SaveChanges(); } }
public void Delete(int Id) { var city = Get(Id); if (city != null) { context.SbDelete(city); context.SaveChanges(); } }
public void Delete(int Id) { var responsibility = Get(Id); if (responsibility != null) { context.SbDelete(responsibility); context.SaveChanges(); } }
public void Delete(int Id) { var infoRestrict = Get(Id); if (infoRestrict != null) { context.SbDelete(infoRestrict); context.SaveChanges(); } }