Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void SettingsDLT_delete_button_Click(object sender, EventArgs e)
- {
- MainWeight main = new MainWeight();
- main.RemoveAllWeight();
- }
- public void RemoveAllWeight()
- {
- try
- {
- using (DaghanKantarEntities context = new DaghanKantarEntities())
- {
- context.tbl_MainWeight.RemoveRange(
- context.tbl_MainWeight.Where(c => c.fldId != null));
- context.SaveChanges();
- }
- }
- catch (Exception exp)
- {
- throw new Exception("Hata: Kayıt Silinemedi - " + exp.Message.ToString(), exp);
- }
- }
- DBCC CHECKIDENT ('table_name', RESEED, 1)
Add Comment
Please, Sign In to add comment