views:

34

answers:

0

Hi all,

I have couple foreign key relationships in my tables, where multiple keys reference to the same primary from a different table. Whenever I try to run the "Run Custom Tool" when I make changes/add/delete new table, from time to time, the generated class append a different number. For example, at the moment, I have this generated code:

public IQueryable<LoanAmount> LoanAmounts14
    {
        get
        {

              var repo=Adinis.Data.LoanAmount.GetRepo();
              return from items in repo.GetAll()
                   where items.Id == _MaxLoanAmountId
                   select items;
        }
    }

Obviously, the number has been increased to "14" now, and I have no idea when will it be increased to 15! The problem is that I'm using this in my View (ASP.NET MVC 2 app), so when I build the solution, everything appears to be working just fine, until I actually run into the page that reference the number 14! Is there a setting so that the number won't change?

Thanks.