public static bool Delete(ConfigMercadoLocal ObjectToDelete) { try { using (var ctx = new SuchDBContext()) { ctx.ConfigMercadoLocal.Remove(ObjectToDelete); ctx.SaveChanges(); } return(true); } catch (Exception e) { return(false); } }
public static ConfigMercadoLocal Update(ConfigMercadoLocal ObjectToUpdate) { try { using (var ctx = new SuchDBContext()) { ctx.ConfigMercadoLocal.Update(ObjectToUpdate); ctx.SaveChanges(); } return(ObjectToUpdate); } catch (Exception e) { return(null); } }