public static int updatecondidate(int condidateID, condidate_table updatedcondidateData) { int rowAffected = 0; using (EmployeementSystemEntities DB = new EmployeementSystemEntities()) { //select condidate for update condidate_table condidateforupdate = (from anything in DB.condidate_table where anything.condidate_id == condidateID select anything).FirstOrDefault(); condidateforupdate.condidate_name = updatedcondidateData.condidate_name; condidateforupdate.condidate_phone = updatedcondidateData.condidate_phone; condidateforupdate.condidate_email = updatedcondidateData.condidate_email; condidateforupdate.condidate_pic = updatedcondidateData.condidate_pic; rowAffected = DB.SaveChanges(); } return rowAffected; }
public static List<condidate_table> SelectAllCondidate() { using (EmployeementSystemEntities DB = new EmployeementSystemEntities()) { List<condidate_table> AllCondidate = (from anything in DB.condidate_table select anything).ToList<condidate_table>(); return AllCondidate; } }
using
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)