public int AddManagerInfo(mis_manager misManager) { helpsEntities helps = new helpsEntities(); helps.mis_manager.Add(misManager); helps.SaveChanges(); return(1); }
public bool CheckManager(mis_manager mis) { helpsEntities helps = new helpsEntities(); // string sql = "select * from mis_manager where name=@name and addres=@phone"; //List<mis_manager> list= helps.Database.SqlQuery<mis_manager>(sql).ToList(); List <mis_manager> list = helps.mis_manager.Where(m => m.name == mis.name && m.phone == mis.phone).ToList(); if (list.Count > 0) { return(true); } else { return(false); } }