我有类似的东西
[MetadataType(typeof(MetaData_Course_application))]
partial class COURSE_APPLICATION
{
}
public class MetaData_Course_application
{
[Required]
[StringLength(15, MinimumLength = 2)]
public string ENTRANCE_ROLL_NO { get; set; }
public int SESSION_ID { get; set; }
public int ENTRANCE_ID { get; set; }
public Int64 COURSE_ID { get; set; }
public DateTime DATE_OF_APPLICATION { get; set; }
public Int64 RANK { get; set; }
public Int64 STUDENT_ID { get; set; }
public bool FEE_PAID { get; set; }
public bool IS_CANCLED_BY_STUDENT { get; set; }
}
and now i want
public void ApplyForCourse(ERP.MetaData_Course_application Coll)
{
COURSE_APPLICATION Collection=(COURSE_APPLICATION)coll;
context = new ERPDataContext();
context.COURSE_APPLICATIONs.InsertOnSubmit(Collection);
context.SubmitChanges();
}
这样的事情有可能吗?如果不是什么应该是最好的解决方案?请提前帮助谢谢