I created a database model from MySQL to Visual Studio 2010. However, in the EntityObject's Create, for a table such as exam which has 9 columns, i only have two parameters (the key columns primary [id_exam], and foreign[user_id_exam]). Why could the rest be disappearing to what can i do about it?
Please help. I am totally stuck. :-(
[EdmEntityTypeAttribute(NamespaceName="examModel", Name="exam")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class exam : EntityObject
{
#region Factory Method
public static exam Createexam(global::System.Int32 id_exam, global::System.Int32 user_id_user)
{
exam exam = new exam();
exam.id_exam = id_exam;
exam.user_id_user = user_id_user;
return exam;
}
#endregion
The tables (exam) SQL code is:
CREATE TABLE IF NOT EXISTS `exam`.`exam` (
`id_exam` INT(11) NOT NULL AUTO_INCREMENT,
`Unit Code` VARCHAR(45) NULL DEFAULT NULL,
`Unit Name` VARCHAR(45) NULL DEFAULT NULL,
`Date` DATE NULL DEFAULT NULL,
`Duration` DECIMAL(10,0) NULL DEFAULT NULL,
`Instructions` VARCHAR(45) NULL DEFAULT NULL,
`University` VARCHAR(45) NULL DEFAULT NULL,
`Course` VARCHAR(45) NULL DEFAULT NULL,
`user_id_user` INT(11) NOT NULL,
PRIMARY KEY (`id_exam`),
INDEX `fk_exam_user1_idx` (`user_id_user` ASC),
CONSTRAINT `fk_exam_user1`
FOREIGN KEY (`user_id_user`)
REFERENCES `exam`.`user` (`id_user`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8