/// <summary> /// Upload New Files those have Id zero /// </summary> /// <param name="files"></param> /// <param name="recordId"></param> /// <param name="context"></param> public static void InsertFiles(List <File> files, int recordId, EMSContext context) { if (files != null) { var fileList = (from x in files where x.FileId == 0 select x).ToList(); foreach (var file in fileList) { file.EmpId = recordId; context.File.AddRange(fileList); } context.SaveChanges(); } }
public UserRepository(EMSContext context) { _context = context; }
public TaskInformationRepository(EMSContext context) { _context = context; }
public EmployeeRepository(EMSContext context) { _context = context; }
public TaskRepository(EMSContext context) { _context = context; }
/// <summary> /// Inactivate the old EmployeeLanguages Mapping Insert New /// </summary> /// <param name="employeeId">EmployeeId</param> /// <param name="employeeLanguagesList">Newly Inserted EmployeeLanguages Mapping</param> /// <param name="context">Employee Context</param> public void InsertEmployeeLanguages(int employeeId, List <EmployeeLanguage> employeeLanguagesList, EMSContext context) { //Remove old Employee Language Mappings var employeeLanguagesListExisted = context.EmployeeLanguage.Where(x => x.EmpId == employeeId).ToList(); context.EmployeeLanguage.RemoveRange(employeeLanguagesListExisted); //Insert New Employee Language Mappings context.EmployeeLanguage.AddRange(employeeLanguagesList); context.SaveChanges(); }
public EmployeeDataManager() { context = new EMSContext(); }
public SubPartRepository(EMSContext context) { _context = context; }
public ProjectRepository(EMSContext context) { _context = context; }
public StatesDataManager() { context = new EMSContext(); }
public PageRepository(EMSContext context) { _context = context; }
public PastEventRepository(EMSContext context) { _context = context; }
public DepartmentRepository(EMSContext context) { _context = context; }
public ContactRepository(EMSContext context) { _context = context; }
public LanguagesDataManager() { context = new EMSContext(); }
public EventTypeRepository(EMSContext context) { _context = context; }
public PositionRepository(EMSContext context) { _context = context; }