public void AddApplicantSkill(ApplicantSkillPoco[] pocos) { EFGenericRepository <ApplicantSkillPoco> repo = new EFGenericRepository <ApplicantSkillPoco>(false); ApplicantSkillLogic logic = new ApplicantSkillLogic(repo); repo.Add(pocos); }
public void AddApplicantWorkHistory(ApplicantWorkHistoryPoco[] pocos) { EFGenericRepository <ApplicantWorkHistoryPoco> repo = new EFGenericRepository <ApplicantWorkHistoryPoco>(false); ApplicantWorkHistoryLogic logic = new ApplicantWorkHistoryLogic(repo); repo.Add(pocos); }
public void AddApplicantJobApplication(ApplicantJobApplicationPoco[] pocos) { EFGenericRepository <ApplicantJobApplicationPoco> repo = new EFGenericRepository <ApplicantJobApplicationPoco>(false); ApplicantJobApplicationLogic logic = new ApplicantJobApplicationLogic(repo); repo.Add(pocos); }
public ActionResult Create([Bind(Include = "Code,Name")] SystemCountryCodePoco systemCountryCodePoco) { if (ModelState.IsValid) { SystemCountryCodePoco[] systemCountryCodes = new SystemCountryCodePoco[] { systemCountryCodePoco }; systemCountryCodeLogic.Add(systemCountryCodes); return(RedirectToAction("Index")); } return(View(systemCountryCodePoco)); }
public ActionResult Create([Bind(Include = "LanguageID,Name,NativeName")] SystemLanguageCodePoco systemLanguageCodePoco) { if (ModelState.IsValid) { SystemLanguageCodePoco[] systemLangPoco = new SystemLanguageCodePoco[] { systemLanguageCodePoco }; systemLanguageLogic.Add(systemLangPoco); return(RedirectToAction("Index")); } return(View(systemLanguageCodePoco)); }
public ActionResult Create([Bind(Include = "Id,Company,ProfileCreated,IsInactive,IsCompanyHidden")] CompanyJobDescriptionPoco companyJobdescriptionPoco) { if (ModelState.IsValid) { companyJobdescriptionPoco.Id = Guid.NewGuid(); _EF.Add(companyJobdescriptionPoco); return(RedirectToAction("Index")); } //ViewBag.Company = new SelectList(db.CompanyProfiles, "Id", "CompanyWebsite", companyJobPoco.Company); return(View(companyJobdescriptionPoco)); }
public ActionResult Create([Bind(Include = "Id,Applicant,Major,CertificateDiploma,StartDate,CompletionDate,CompletionPercent")] ApplicantEducationPoco applicantEducationPoco) { if (ModelState.IsValid) { // applicantEducationPoco.Id = Guid.NewGuid(); // db.ApplicantEducations.Add(applicantEducationPoco); // db.SaveChanges(); repo.Add(applicantEducationPoco); return(RedirectToAction("Index")); } return(View()); // ViewBag.Applicant = new SelectList(db.ApplicantProfiles, "Id", "Currency", applicantEducationPoco.Applicant); // return View(applicantEducationPoco); }
static void Main(string[] args) { EFGenericRepository <StudentPoco> students = new EFGenericRepository <StudentPoco>(); students.Add(new StudentPoco() { Courses = new List <CoursePoco>() { new CoursePoco() { Name = ".Net Bridging" } }, Name = "James Estrella" }); }
static void Main(string[] args) { var res = new SystemLanguageCodePoco() { LanguageID = "AM", Name = "AMHARIC", NativeName = "AMHA" }; using (CareerCloudContext context = new CareerCloudContext()) { context.Database.Log = Console.Write; EFGenericRepository <SystemLanguageCodePoco> eF = new EFGenericRepository <SystemLanguageCodePoco>(); eF.Add(res); } }
// Метод, который добавляет город public static bool AddCity(string name) { try { if (name != null && name != string.Empty) { IRepository <City> db = new EFGenericRepository <City>(new DataBase.ASTI.ASTI()); // Создаем репозиторий для работы с БД db.Add(new City() { CityName = name }); // Добавляем город в БД return(true); // т.к. город успешно добавлен } } catch (Exception) { // Обработать какую-нибудь ошибку } return(false); // т.к. возникла какая либо ошибка при добавлении города }
public void Add(CoursePoco student) { _eFGenericRepository.Add(student); }
public void Add(StudentPoco student) { _eFGenericRepository.Add(student); }
public void Add(EnrollmentPoco studentCourse) { _eFGenericRepository.Add(studentCourse); }