System.Data.Entity.DbSet entity doesn't get updated with sequence nextval

I am using EF6 with oracle 12c client. I need dynamic entity object to be added in System.Data.Entity.DbSet
System.Data.Entity.DbSet entity = Request.Context.Set(obj.GetType());
Object Updated = entity.Add(obj);
Result_SaveChanges = Request.Context.SaveChanges();
int sequence = Request.Context.Database.SqlQuery<int>("SELECT " + SeqName + ".currval FROM DUAL").FirstOrDefault();
Save Changes doesn't update the object's key but fetching the sequence give me the updated value. I need System.Data.Entity.DbSet entity to be properly updated so that i can insert child entities too through their navigation properties.

Hello Sidra,
Since you are working with EF based on Oracle database provider, for this, i suggest that you could post it to the Oracle related forum:
https://community.oracle.com/welcome
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Is it possible to update the data in entity via System.Data.Entity.DbSet entity

     If i want to insert a record in dynamically created entity, i can do something like,
    System.Data.Entity.DbSet entity = Request.Context.Set(obj.GetType());
    Object Updated = entity.Add(obj);
    but if i want to update the record in same entity how can i do that? Please help i am new to EF.

    Hello Sidra,
    >>but if i want to update the record in same entity how can i do that? Please help i am new to EF.
    If you use the object type, you need to modify its properties by using reflection because at compile time, the type is not known to compiler:
    https://msdn.microsoft.com/en-us/library/axt1ctd9(v=vs.110).aspx
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Aspnet_compiler web.config(132): error ASPCONFIG: Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'

    My latest MVC 5 project built with VS 2013 compiled and works fine on my PC but can not be published to server using command line aspnet_compiler. I kept getting the web.config(132): error ASPCONFIG: Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'
    In my web.config file, I have the following as suggested by many for solution:
    <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
     <add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
    However, the error is persisting.  I have no clue how to fix this.  Hope someone can help.

    Hello FredVanc,
    As you mentions, it could work with your develop environment, so I am wondering it is that on the server machine, the assembly is not there actually. Here are some information I found which might be helpful:
    https://support.microsoft.com/en-gb/kb/958975?wa=wsignin1.0
    https://social.msdn.microsoft.com/Forums/en-US/1295cfa8-751b-4e9b-a7a7-14e1ad1393b6/compiling-error?forum=adodotnetentityframework
    By the way, since this issue is related with ASP.ENT project, I suggest that you could post it to the ASP.NET forum, there are web experts will help you:
    http://forums.asp.net/
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • System.Data.Entity.Core.EntityCommandExecutionException was caught.

     Actually I think it's a bug.
    Exception Details;
    System.Data.Entity.Core.EntityCommandExecutionException was caught
      HResult=-2146232004
      Message=The data reader is incompatible with the specified 'EntitySampleWFA.Source.BO.Student'. A member of the type, 'Id', does not have a corresponding column in the data reader with the same name.
      Source=EntityFramework
      StackTrace:
           source: System.Data.Entity.Core.Query.InternalTrees.ColumnMapFactory.GetMemberOrdinalFromReader(DbDataReader storeDataReader, EdmMember member, EdmType currentType, Dictionary`2 renameList)
           source: System.Data.Entity.Core.Query.InternalTrees.ColumnMapFactory.GetColumnMapsForType(DbDataReader storeDataReader, EdmType edmType, Dictionary`2 renameList)
           source: System.Data.Entity.Core.Query.InternalTrees.ColumnMapFactory.CreateColumnMapFromReaderAndType(DbDataReader storeDataReader, EdmType edmType, EntitySet entitySet, Dictionary`2 renameList)
           source: System.Data.Entity.Core.Objects.ObjectContext.InternalTranslate[TElement](DbDataReader reader, String entitySetName, MergeOption mergeOption, Boolean streaming, EntitySet& entitySet, TypeUsage& edmType)
           source: System.Data.Entity.Core.Objects.ObjectContext.ExecuteStoreQueryInternal[TElement](String commandText, String entitySetName, ExecutionOptions executionOptions, Object[] parameters)
           konum: System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass65`1.<ExecuteStoreQueryReliably>b__64()
           source: System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
           source: System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass65`1.<ExecuteStoreQueryReliably>b__63()
           source: System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
           source: System.Data.Entity.Core.Objects.ObjectContext.ExecuteStoreQueryReliably[TElement](String commandText, String entitySetName, ExecutionOptions executionOptions, Object[] parameters)
           source: System.Data.Entity.Core.Objects.ObjectContext.ExecuteStoreQuery[TElement](String commandText, ExecutionOptions executionOptions, Object[] parameters)
           source: System.Data.Entity.Internal.InternalContext.<>c__DisplayClass14`1.<ExecuteSqlQuery>b__13()
           source: System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
           source: System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
           source: EntitySampleWFA.Source.BO.SchoolManager.IsStandardInNotUse(Int32 standardId) c:\Users\Krkt\Desktop\VS_Projects\EntitySampleWFA\EntitySampleWFA\Source\BO\SchoolManager.cs : Line 138
    Line throws Exception;
    DbRawSqlQuery<Student> sts = sch.Database.SqlQuery<Student>("Select * From [SchoolSchem].[Students] Where StandardId=@StandardId;", new SqlParameter("@StandardId", standardId));
    Business Object;
    [Table("Students", Schema = "SchoolSchem")]
        internal class Student
            public Student()
            [Key]
            [Column("StudentId")]
            [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
            public int Id { get; set; }
            [Column("StudentName")]
            [StringLength(100, MinimumLength = 10)]
            public string Name { get; set; }
            public DateTime? DateOfBirth { get; set; }
            public decimal Height { get; set; }
            public float Weight { get; set; }
            public byte[] Photo { get; set; }
            [ForeignKey("Teacher")]
            public int TeacherId { get; set; }
            public Teacher Teacher { get; set; }
            [ForeignKey("Standard")]
            public int StandardId { get; set; }
            public Standard Standard { get; set; }
    Exception details are above. I think reason of exception is mapping failure at Id Property(Mapping to "StudentId" Column).
    After i have changed columns as StudentId -> Id, StudentName -> Name, There is no any exception. Problem solved.
    Is there another idea?

    Hello,
    try this:
    http://knowledgebase.progress.com/articles/Article/9542
    http://expertland.net/question/253v4r9w21mbb4l7c26u7pmws92pa91l/detail.html

  • [svn:osmf:] 10991: Fix bug FM-119, where the playhead time doesn' t get updated until after the seek has completed.

    Revision: 10991
    Author:   [email protected]
    Date:     2009-10-17 22:52:28 -0700 (Sat, 17 Oct 2009)
    Log Message:
    Fix bug FM-119, where the playhead time doesn't get updated until after the seek has completed.  The bug is actually in Flash Player (FP-1705), and the workaround is to wait until NetStream.time gets updated before dispatching the seek completion event.  This changelist also updates the unit tests and NetMocker to verify the fix.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-119
        http://bugs.adobe.com/jira/browse/FP-1705
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/net/NetStreamSeekableTrait.as
        osmf/trunk/framework/MediaFramework/org/osmf/traits/SeekableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/audio/TestAudioSeekableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayer.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/net/TestNetStreamSeekableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/traits/TestISeekable.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/traits/TestSeekableTrait.as
        osmf/trunk/libs/adobe/NetMocker/org/osmf/netmocker/MockNetStream.as
        osmf/trunk/libs/adobe/NetMockerTest/org/osmf/netmocker/TestMockNetStream.as

    Revision: 10991
    Author:   [email protected]
    Date:     2009-10-17 22:52:28 -0700 (Sat, 17 Oct 2009)
    Log Message:
    Fix bug FM-119, where the playhead time doesn't get updated until after the seek has completed.  The bug is actually in Flash Player (FP-1705), and the workaround is to wait until NetStream.time gets updated before dispatching the seek completion event.  This changelist also updates the unit tests and NetMocker to verify the fix.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-119
        http://bugs.adobe.com/jira/browse/FP-1705
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/net/NetStreamSeekableTrait.as
        osmf/trunk/framework/MediaFramework/org/osmf/traits/SeekableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/audio/TestAudioSeekableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayer.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/net/TestNetStreamSeekableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/traits/TestISeekable.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/traits/TestSeekableTrait.as
        osmf/trunk/libs/adobe/NetMocker/org/osmf/netmocker/MockNetStream.as
        osmf/trunk/libs/adobe/NetMockerTest/org/osmf/netmocker/TestMockNetStream.as

  • HT6058 My ipad2 doesn't get updated instead all mails are also blocked! pls hellp

    My ipad2 doesn't get updated instead all mails are also blocked! pls hellp

    How are you trying to update? Over the air or connected to computer?
    Mails blocked? What is happening when you try to get mail?
    Are you seeing any error messages? A little more info would be nice.

  • OVM-Manager 2.2 doesn't gets updated properly.

    hi,
    i have ovm 2.2 setup consist of 4 servers in cluster.
    whenever any of the servers get rebooted.The guest vm gets restarted on the next available resource server.
    And now in the OVM-Manager side i see all the guest tht got restarted on the next available resource server shows the status as "UNKNOWN"
    OVM-Manager doesn't gets updated properly.
    currently in all my vm servers i have ovs-agent version "ovs-agent-2.3-27"
    please suggest....

    hi Avi,
    thks for your reply..
    i had upgraded ovs-agent form 2.3-27 to 2.3-31.
    i noticted one thing which commom for both ovs-agent version
    VIP doesn’t works properly using any of the ovs-agent version (2.3-27 nor 2.3-31)
    Whenever VIP is enabled it leads to two major problems.
    1)Disturbs the Server Pool HA. It works initially and then start showing unusual behavior .
    2)OVM-Manager doesn’t gets updated.
    Hence the whole setup is disturbed.
    But when only Server Pool HA is enabled & NOT VIP everything works properly .i.e. HA across the Pool & even ovm-manager gets updated time to time.
    Seems there is still some bug in the ovs-agent 2.3-31 also especially for VIP.

  • Item text in Purchase Order getting updated with info. record Purchase Order Text

    Hello All,
    I am working in a roll out project and facing issue in text repeating twice for the line item in the Purchase Order for the new company code for which rollout is happening
    Issue:
    Item text in Purchase Order getting updated with info. record Purchase Order Text
    01) PO Text is maintained in the material master under "Purchase Order Text" tab
    02) The PO text that is maintained in material master is getting updated in the Purchase Info. Record
    03) When Purchase Order is created, the "Item Text" gets updated in the Purchase Order automatically only for the new company code for which rollout is happening. when printed, this results in the text getting duplicated twice
    03.1) this behavior is not observed in the Plants/ Company code that is already Live
    Configurations in the system:
    The copying rules for the "Texts for Purchase Orders" is
    Source Object = "Info Record", Source Text="Purchase Order Text", Fix="*"
    We have modified the Purchase Order form to print one of  the condition types maintained for calculating the tax. Other than this there is no change to the plants that are already live.
    I could not locate any "Purchase Organization" / "Company Code" / "Plant specific configuration.
    Am I missing any configuration or where can I look in what is causing this error.
    Request help from the experts in the forum.
    with Regards,
    Dhandapani R

    There is no company/purchasing/plant specific customizing for purchase order text.
    The customizing copying rules for the "Texts for Purchase Orders" affects all equally .
    If the text in the purchase order in ME23N is already filled different to other plants, then you either have a modification in place, or the texts are differently maintained in the referenced data (vendor, material, info record, contract)

  • Dispute case does not get updated with subsequent partial payment

    Hi Experts
    I am now still testing the Dispute management .. but it's my first time to see that some times created dispute case does not get updated with the payment posted against the invoice which the dispute case has been raised .. when i trying to add open item to the current dispute case i face this Error..
    Process step 004: Change not possible, process step 003 missing
    Message no. UDM_MSG037
    Diagnosis
    The dispute case is to be changed by process step 004 from accounting. However, there is at least one process (for example, clearing transaction from payment or credit memo) that was performed before the current step and that has not yet updated the dispute case. The changes to the dispute case must be carried out in the correct order.
    System Response
    The dispute case could not be changed.
    Procedure
    In an asynchronous change to dispute cases using IDoc, make sure that all IDocs of the previous process have been posted. Then you can carry out the required action (for example, post the current IDoc from process step 004 or include further items). The immediate previous process step is 003.
    Your kind feed back is highly appreciated..
    Regards
    Mahmoud EL Nady

    Hi
    Thanks for straight forward solutions its now working properly after run the program.. thanks too much..
    also do i need to run this program periodically or once i notice that one dispute case it not getting updated?
    Regards
    Mahmoud El Nady

  • Dimension foreign key on Fact gets updated with same value

    Hi All,
    I'm hoping someone has at least seen this problem and can provide insight.
    Background:
    - We are on OWB 10.2
    - Fact table is Billing_F
    - Fact table has foreign keys to Customer_Dim, SalesOrg_Dim, Time_Dim, etc.
    - Fact table has update mode Update/Insert
    Once in a while, every row in the Billing Fact gets updated with the SAME SalesOrg_Dim foreign key column value. In other words, the data would look like:
    Before:
    Line ID Amt SalesOrg_Key
    1 100 19241
    2 200 21925
    3 140 08585
    After:
    Line ID Amt SalesOrg_Key
    1 100 12345
    2 200 12345
    3 140 12345
    *** The Source tables contain values in the Before table. ***
    We can't reproduce this on a consistent basis. The only way to "correct" the data is to rerun the mapping from source -> staging -> fact again. No other change.
    Please, has anyone else at least experienced this problem? If so, how were you able to fix it permanently?
    Any help is greatly appreciated!
    irene

    Hi Irene
    Difficult to help here without reviewing your mappings/schedule but does SalesOrgKey 12345 represent a particular value e.g. Unknown, Default?
    I suspect it's something to do with your load order in that the data in the dimension is not available/ready when the fact is loaded and therefore a default value is being inserted. When the fact load is rerun I'm guessing the load of the dimension has finished and therefore the key lookup returns the proper keys from the dimension. Is the dimension truncated and reloaded?
    Regards
    Si

  • GL to get updated with Moving average price

    Hi Guru's
    when we do PGI, currently the cost of goods issue value is updated from Moving average price into a GL account,
    Now i have created a new GL account and also want this new GL to get updated with the Moving average Price.
    Where can i make these settings. can u give step by step solution.
    Regards
    Abhijeet

    First u pls check how its updating with moving average price and select in MMRecord valuation class and price options, then check settings for ur gl account go to fs00 display mode check settings in control data.
    Compare ur gl account which u have created with standard Gl account.

  • [svn] 4706: When handling the damageEvent make sure _contents gets updated with the potentially modified contents of the textFlow .

    Revision: 4706
    Author: [email protected]
    Date: 2009-01-28 07:58:30 -0800 (Wed, 28 Jan 2009)
    Log Message:
    When handling the damageEvent make sure _contents gets updated with the potentially modified contents of the textFlow. Either the contents or the style of the text flow, or both could have triggered the damage event.
    QE Notes:
    Doc Notes:
    Bugs: SDK-18749
    Reviewers: Gordon
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18749
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • I have a column where I have implemented writeback, its working fine. On top of this I need to show 0 as No and 1 as yes in our report, that is also done. Now I want to enter Yes in a column where it was no and I want database table to get update with 1.

    I have a column where I have implemented writeback, its working fine. On top of this I need to show 0 as No and 1 as yes in our report, that is also done. Now I want to enter Yes in a column where it was no and I want database table to get update with 1. I am not sure how to do it. SOmeone please help me out.

    Hi ,
    In your write back XML  try the below  query insert
    INSERT INTO TABLE_XYZ (attribute1)  values (SELECT CASE  WHEN @{C1}=’Yes’ then 1 when @{C1}=’No’ then 0 else null end from dual)
    Regards
    Rajagopal

  • KINAK field in Table KONV not getting updated with value W

    Hi,
    I have a PO where I am deleting a line item.
    After I delet line item the field KINAK in table KONV gets updated with value W.
    But I am getting instance where in some cases the field KINAK is not getting updated.
    The result is deleted line item is getting populated in PO output also.
    Regards
    Nandiini

    KINAK is updated only when a Condition is inactive ! So when a item is deleted the condition becomes inactive and gets updated with 'W' which means statistical(not to be counted)
    A     Condition exclusion item
    K     Inactive due to calculation basis/shipping material type
    L     Condition exclusion header or inactive at header level
    M     Inactive due to manual entry
    T     Inactive at header level
    W     The document item is statistical
    X     Inactive via formulae of incorrect
    X     Inactive via formulae of incorrect
    Y     Inactive because of subsequent price

  • Open PO did not get updated with new price.

    A mass price change was updated in SAP for one of the supplier . All open orders did not get updated with this new prices.
    Can anyone tell me the reason why ?
    -Amol

    hi
    i think u have to do it manually
    logically if u see u can use diffrent prices in diff po
    if ur price is inr 100 in 1st po and u done gr ur rice will get updated in mm suppose it is 105
    next time u create the po of 110 rs  and done gr
    suppose ur price updated is 108 rs inmm
    so it is not happening that 108 is get updated in ur 1st po
    right so i think u have to update pos manually
    if i am wrong plz let me know
    regards
    kunal

Maybe you are looking for

  • Apple application support was not found apple application is required to run ituneshelper please un istall itunes then install itunes again erro 2

    I can't install itunes for windows 7 to 64bit i tried several times and at the end show up this... "apple application support was not found apple application is required to run ituneshelper please un istall itunes then install itunes again erro 2" ..

  • Charger port issue?

    So I've been having a slight issue with my Droid X. This started yesterday. I had it plugged in and it randomly stopped charging then started again. It was quick but I saw it. It happened again today. So I'm wondering if my Droid's charger port is **

  • Segment level I/O statistics in Oracle 8i

    I need to get segment level i/o statistics in Oracle 8i. I am looking at v$session_wait to find out the block id each i/o event is happening to. But for 'db file parallel write' event, there is only number of files and number of blocks info. How do I

  • Elements 6 to Elements 8

    Hello, I have changed my old computer (Windows Vista) and are now on an (Windows 7 2010 64 bites) In old machine I did run Photoshop Elements 6 and have now bought a new Elements 8. What files is needed to be moved to get all functions on Organizar.

  • Restore source system

    .after the Client copy to the source system I want to  restore the source system what hapens to the objects which already migrated to BI 7.0  and all the transformations and DTP's created. Partner profile and IDoc settings