Getting error inheriting partial class fields for LINQ Stored Procedure
===

I have following function in score.designer.cs, it gets id, score, name from table A

    [Function(Name = "usp_GetScore")]
            public ISingleResult<usp_GetScoreResult> usp_GetScore([Parameter(DbType = "int")] string id)
            {
                IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), id);
                return ((ISingleResult<usp_GetScoreResult>)(result.ReturnValue));
            }

Two partial classes under designer.cs (GetAllScore uses Table B which is output table basically for Table A)

     public partial class usp_GetScoreResult : usp_GetAllScore
     {
         private int _Score; 
    
         [Column(Storage="_Score", DbType="INT NOT NULL")]
         public int Id
         {
             get
             {
                 return this._Score;
             }
             set
             {
                 if ((this._Score != value))
                 {
                     this._Score = value;
                 }
             }
         } 	
     }
    
     public partial class usp_GetAllScore
     {
         private int _Id; 
    
         [Column(Storage="_Id", DbType="INT NOT NULL")]
         public int Id
         {
             get
             {
                 return this._Id;
             }
             set
             {
                 if ((this._Id != value))
                 {
                     this._Id = value;
                 }
             }
         } 	
    
         [Column(Storage="_Name", DbType="VarChar(10) NOT NULL")]
         public int Id
         {
             get
             {
                 return this._Name;
             }
             set
             {
                 if ((this._Name != value))
                 {
                     this._Name = value;
                 }
             }
         } 	
     }

under score.cs i am calling one of the stored procedures:


    List<usp_GetScoreResult> scores = null;
    
    foreach( var level in differentLevels.ToList())
    {
    	scores = context.usp_GetScoreResult(level).ToList(); //throws an error here.

I get this error when i run above code:

exc = {"Data member 'System.Int Id' of type 'usp_GetAllScore' is not part of the mapping for type 'usp_GetScoreResult'. Is the member above the root of an inheritance hierarchy?"}

Can anybody please explain and show in the code if possible how to fix this? Or what am i doing wrong here? Thanks in advance!





