开发者

How to use POCO with Domain Service Class Dialog?

I want the Domain Service Class to show my entities so that I can have it generate CRUD for me. Why is nothing showing up?

Project structure:

EF model sits in class library and POCO (.tt) sits in another class library

How to use POCO with Domain Service Class Dialog?

For now I have manually created the CRUD operations, but I want the dialog to create them.

@Akash Kava: Here is a primary key for one of the pocos:

    [DataMember]
    public int CVAdvancementQuotientId
    {
        get { return _cVAdvancementQuotientId; }
        set
        {
            if (_cVAdvancementQuotientId != value)
            {
                if (ChangeTracker.ChangeTrackingEnabled && ChangeTracker.State != ObjectState.Added)
                {
                    throw new InvalidOperationException("The property 'CVAdvancementQuotientId' is part of the object's key and cannot be changed. Changes to key properties can only be made when the object is not being tracked or is in the Added state.");
                }
                _cVAdvan开发者_如何转开发cementQuotientId = value;
                OnPropertyChanged("CVAdvancementQuotientId");
            }
        }
    }
    private int _cVAdvancementQuotientId;


  • Have you changed the Custom Tool Namespace for the tt file?
    Also, you'd have to edit the .tt file and chenge the line: string inputFile = @"$edmxInputFile$” to e.g. string inputFile = @"../DAL/Northwind.edmx";.
  • There was a reported bug which is fxed now, you can find more info at this address.
  • You'd have to install the WCF RIA Services Toolkit. You can find it here.


^^ Make your code CodeGenerationStrategy as Default rather than none > delete .tt files from your EF model >> Rebuild >> Entities will show up

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜