//------------------------------------------------------------------------ public static string GetNameByCoId(this string[] coIds) { using (dbAfrzEntities db = new dbAfrzEntities()) { var coId = ""; var workersName = ""; for (int i = 0; i < coIds.Length; i++) { coId = coIds[i]; var coIdEmployee = db.tabEmployees.FirstOrDefault(t => t.nvcCoID == coId); workersName += coIdEmployee.nvcFirstname + " " + coIdEmployee.nvcLastname + "-"; } workersName = workersName.Remove(workersName.Length - 1); return(workersName); } }
public MaintenancePartsService(DbContext db) : base(db) { _db = (dbAfrzEntities)db; }