public static void DeleteCellphone(CellphoneEntity oCellphone) { using (var bd = new CellphoneContext()) { bd.Cellphones.Remove(oCellphone); bd.SaveChanges(); } }
public static void CreateCellphone(CellphoneEntity oCellphone) { using (var bd = new CellphoneContext()) { bd.Cellphones.Add(oCellphone); bd.SaveChanges(); } }