Fix misspelling
This commit is contained in:
+4
-4
@@ -65,7 +65,7 @@ CREATE TABLE IF NOT EXISTS `Resume` (
|
||||
FOREIGN KEY (`ResumeExperienceID`) REFERENCES `ResumeExperience`(`ID`) ON DELETE CASCADE
|
||||
) AUTO_INCREMENT=1;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ResumeMillitary` (
|
||||
CREATE TABLE IF NOT EXISTS `ResumeMilitary` (
|
||||
`ID` int NOT NULL AUTO_INCREMENT,
|
||||
`ResumeID` int NOT NULL,
|
||||
`Country` char(2) NOT NULL,
|
||||
@@ -77,15 +77,15 @@ CREATE TABLE IF NOT EXISTS `Resume` (
|
||||
FOREIGN KEY (`ResumeID`) REFERENCES `Resume`(`ID`) ON DELETE CASCADE
|
||||
) AUTO_INCREMENT=1;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ResumeMillitaryBullet` (
|
||||
CREATE TABLE IF NOT EXISTS `ResumeMilitaryBullet` (
|
||||
`ID` int NOT NULL AUTO_INCREMENT,
|
||||
`ResumeID` int NOT NULL,
|
||||
`ResumeMillitaryID` int NOT NULL,
|
||||
`ResumeMilitaryID` int NOT NULL,
|
||||
`Achevement` varchar(100) NOT NULL,
|
||||
`Description` text DEFAULT NULL,
|
||||
PRIMARY KEY (`ID`),
|
||||
FOREIGN KEY (`ResumeID`) REFERENCES `Resume`(`ID`) ON DELETE CASCADE,
|
||||
FOREIGN KEY (`ResumeMillitaryID`) REFERENCES `ResumeMillitary`(`ID`) ON DELETE CASCADE
|
||||
FOREIGN KEY (`ResumeMilitaryID`) REFERENCES `ResumeMilitary`(`ID`) ON DELETE CASCADE
|
||||
) AUTO_INCREMENT=1;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ResumeEducation` (
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace BoredCareers.Entities {
|
||||
public string JobFunction { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ResumeMillitary {
|
||||
public class ResumeMilitary {
|
||||
public int ID { get; set; } // PK
|
||||
public int ResumeID { get; set; } // FK
|
||||
public string Country { get; set; } = ""; // 2 Letter Country Code
|
||||
@@ -50,12 +50,12 @@ namespace BoredCareers.Entities {
|
||||
public DateTime DateStarted { get; set; } = new DateTime();
|
||||
public bool StillServing { get; set; } = false;
|
||||
public DateTime DateEnded { get; set; } = new DateTime();
|
||||
public ResumeMillitaryBullet[] MillitaryBullets = [];
|
||||
public ResumeMilitaryBullet[] MillitaryBullets = [];
|
||||
}
|
||||
|
||||
public class ResumeMillitaryBullet {
|
||||
public class ResumeMilitaryBullet {
|
||||
public int ID { get; set; } // PK
|
||||
public int ResumeMillitaryID { get; set; } // FK
|
||||
public int ResumeMilitaryID { get; set; } // FK
|
||||
public string Achevement { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
}
|
||||
|
||||
@@ -64,8 +64,8 @@ namespace BoredCareers.Services.DatabaseService {
|
||||
MySqlCommand resumeCommand = new MySqlCommand("SELECT * FROM Resume WHERE ID = @ResumeID;", connection);
|
||||
MySqlCommand ResumeExperienceCommand = new MySqlCommand("SELECT * FROM ResumeExperience WHERE ResumeID = @ResumeID;", connection);
|
||||
MySqlCommand ResumeExperienceBulletCommand = new MySqlCommand("SELECT * FROM ResumeExperienceBullet WHERE ResumeID = @ResumeID;");
|
||||
MySqlCommand ResumeMillitaryCommand = new MySqlCommand("SELECT * FROM ResumeMillitary WHERE ResumeID = @ResumeID;", connection);
|
||||
MySqlCommand ResumeMillitaryBulletCommand = new MySqlCommand("SELECT * FROM ResumeMillitaryBullet WHERE ResumeID = @ResumeID", connection);
|
||||
MySqlCommand ResumeMilitaryCommand = new MySqlCommand("SELECT * FROM ResumeMilitary WHERE ResumeID = @ResumeID;", connection);
|
||||
MySqlCommand ResumeMilitaryBulletCommand = new MySqlCommand("SELECT * FROM ResumeMilitaryBullet WHERE ResumeID = @ResumeID", connection);
|
||||
MySqlCommand ResumeEducationCommand = new MySqlCommand("SELECT * FROM ResumeEducation WHERE ResumeID = @ResumeID;", connection);
|
||||
MySqlCommand ResumeSkillCommand = new MySqlCommand("SELECT * FROM ResumeSkill WHERE ResumeID = @ResumeID;", connection);
|
||||
MySqlCommand ResumeLanguageCommand = new MySqlCommand("SELECT * FROM ResumeLanguage WHERE ResumeID = @ResumeID;", connection);
|
||||
@@ -75,8 +75,8 @@ namespace BoredCareers.Services.DatabaseService {
|
||||
resumeCommand.Parameters.AddWithValue("@ResumeID", ResumeID);
|
||||
ResumeExperienceCommand.Parameters.AddWithValue("@ResumeID", ResumeID);
|
||||
ResumeExperienceBulletCommand.Parameters.AddWithValue("@ResumeID", ResumeID);
|
||||
ResumeMillitaryCommand.Parameters.AddWithValue("@ResumeID", ResumeID);
|
||||
ResumeMillitaryBulletCommand.Parameters.AddWithValue("@ResumeID", ResumeID);
|
||||
ResumeMilitaryCommand.Parameters.AddWithValue("@ResumeID", ResumeID);
|
||||
ResumeMilitaryBulletCommand.Parameters.AddWithValue("@ResumeID", ResumeID);
|
||||
ResumeEducationCommand.Parameters.AddWithValue("@ResumeID", ResumeID);
|
||||
ResumeSkillCommand.Parameters.AddWithValue("@ResumeID", ResumeID);
|
||||
ResumeLanguageCommand.Parameters.AddWithValue("@ResumeID", ResumeID);
|
||||
@@ -86,15 +86,15 @@ namespace BoredCareers.Services.DatabaseService {
|
||||
Task<DbDataReader> resumeReader = resumeCommand.ExecuteReaderAsync();
|
||||
Task<DbDataReader> ResumeExperienceReader = ResumeExperienceCommand.ExecuteReaderAsync();
|
||||
Task<DbDataReader> ResumeExperienceBulletReader = ResumeExperienceBulletCommand.ExecuteReaderAsync();
|
||||
Task<DbDataReader> ResumeMillitaryReader = ResumeMillitaryCommand.ExecuteReaderAsync();
|
||||
Task<DbDataReader> ResumeMillitaryBulletReader = ResumeMillitaryBulletCommand.ExecuteReaderAsync();
|
||||
Task<DbDataReader> ResumeMilitaryReader = ResumeMilitaryCommand.ExecuteReaderAsync();
|
||||
Task<DbDataReader> ResumeMilitaryBulletReader = ResumeMilitaryBulletCommand.ExecuteReaderAsync();
|
||||
Task<DbDataReader> ResumeEducationReader = ResumeEducationCommand.ExecuteReaderAsync();
|
||||
Task<DbDataReader> ResumeSkillReader = ResumeSkillCommand.ExecuteReaderAsync();
|
||||
Task<DbDataReader> ResumeLanguageReader = ResumeLanguageCommand.ExecuteReaderAsync();
|
||||
Task<DbDataReader> ResumeCertificationReader = ResumeCertificationCommand.ExecuteReaderAsync();
|
||||
Task<DbDataReader> ResumeProjectnReader = ResumeProjectCommand.ExecuteReaderAsync();
|
||||
|
||||
await Task.WhenAll(resumeReader, ResumeExperienceReader, ResumeExperienceBulletReader, ResumeMillitaryReader, ResumeMillitaryBulletReader, ResumeEducationReader, ResumeSkillReader, ResumeLanguageReader, ResumeCertificationReader, ResumeProjectnReader);
|
||||
await Task.WhenAll(resumeReader, ResumeExperienceReader, ResumeExperienceBulletReader, ResumeMilitaryReader, ResumeMilitaryBulletReader, ResumeEducationReader, ResumeSkillReader, ResumeLanguageReader, ResumeCertificationReader, ResumeProjectnReader);
|
||||
|
||||
using (DbDataReader reader = await resumeReader) {
|
||||
while (await reader.ReadAsync()) {
|
||||
@@ -138,11 +138,11 @@ namespace BoredCareers.Services.DatabaseService {
|
||||
|
||||
}
|
||||
|
||||
using (DbDataReader reader = await ResumeMillitaryReader) {
|
||||
using (DbDataReader reader = await ResumeMilitaryReader) {
|
||||
|
||||
}
|
||||
|
||||
using (DbDataReader reader = await ResumeMillitaryBulletReader) {
|
||||
using (DbDataReader reader = await ResumeMilitaryBulletReader) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user