Click here to Skip to main content
15,899,634 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I have a project, Silverlight Business Application. I created .edmx file, and based on that, domain service. Database has many entities, so I decided to divide entities in few edmx files, so I could create few domain services.
Everything was ok with the first one. Then I tried to add another edmx file, and changed Custom Tool Namespace. Now first edmx has Custom Tool Namespace set to Project.Web, and the second one Project.Models.Partner.
But, when I compile project, I get errors. Somehow, classes from the first domain don't recognize namespace. And if I had

public partial class Domain
{
     public virtual ICollection<domainvalue> DomainValues
     {
        get;
        set;
     }
}

 public partial class Domain
    {
        #region Fields and Properties
        public DomainValue CurrentDomainValue
        {
            get
            {
                return this.DomainValues.FirstOrDefault();
            }
        }
        #endregion
    }
</domainvalue>


after adding the second edmx, I get an error at this line:
return this.DomainValues.FirstOrDefault();
it says it doesn't recognize the DomainValues...

Could someone please explain me what is the procedure of creating new edmx file, and domain service, if I already had one?

Best,
Lucky
Posted
Comments
Mark Salsbery 10-Jul-11 19:34pm    
They can be added with the Project/Add new item... option in Visual Studio. Not sure what went wrong with yours....check the tool-generated code and make sure it's using the namespace(s) you think it is.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900