Entity Framework DataSource

Posted by: ejbang on 30 November 2017, 4:41 pm EST

    • Post Options:
    • Link

    Posted 30 November 2017, 4:41 pm EST

    Hi,

    I have the following code and MDI Program.

    Form 1 and Form 2 are running simultaneously.

    Program.cs

    EntityClientCache ClientCache = EntityClientCache.GetDefault(typeof(Bookentities));

    Form1.cs

    EntityClientScope _scope1 = ClientCache.CreateScope();

    View viewPublisher = (from p in _scope1.GetItems()

    select new

    {

    p.PublisherNO,

    p.PublisherName

    }).AsDynamic();

    // data add to viewPublisher

    Form2.cs

    EntityClientScope _scope2 = ClientCache.CreateScope();

    View viewBook = (from p in _scope2.GetItems()

    select new

    {

    p.PublisherNO,

    p.BookNO,

    p.BookName

    }).AsDynamic();

    // data add to viewBook

    when I run ClientCache.SaveChanges(),All changes are stored on the server.

    but I only want to store viewPublisher in Form1 on server.

    It’s an important issue.

    I wonder if there’s any way to solve it.

    Regards,

    Richard

  • Posted 5 December 2017, 9:34 am EST

    Hello Richard,

    We tried replicating the structure of your application by modifying the product sample, Orders-EF but were not successful. So, could you please share a stripped version of your application, so that we can then work upon that application and help you better.

    Regards,

    Ruchir Agarwal

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels