Sajid Hussain

Sajid Hussain

  • 1.2k
  • 514
  • 101.5k

How Do I Delete All Records In Sql Using Condition&LINQ

Jan 14 2015 12:43 AM
i have web form .in which i have button to delete all records against one date.there are two fields in the form,one drop down list where all sector are given,and is a date.when user select a sector and put a date in the field,and click on delete button then all record will be deleted.c# code is as follow,i want linq statement in which i can use where clause.
 
protected void Clear_Roaster(object sender, EventArgs e)
 { int sectorId = SafeConvert.ToInt32(ddlsectorRoaster.SelectedValue);
DateTime dt = SafeConvert.ToDateTime(txtDate.Text);
_service.DeleteEmployeeStatus(sectorId);
}

Answers (1)