ServerApplicationContext SaveChanges loose data

Hi, I've an entity with 2 navigation property (ForeignKey).
In WebApi controller with ServerApplicationContext I want to add new entity with the following code:
navprop1 = CurrentDataWorkspace.ApplicationData.Type1.GetQuery().Execute()
                  .Where(a => a.UserName == _entity.username).FirstOrDefault();
navprop2 = CurrentDataWorkspace.ApplicationData.Type2.GetQuery().Execute()
                  .Where(a => a.Id == _entity.Type2id).FirstOrDefault();
var newentity = navprop1.Type3.AddNew();
newentity.Type2 = navprop2;
with debug breakpoint I've checked that newentity has navprop1 and navprop2 value not null.
When calling "CurrentDataWorkspace.ApplicationData.SaveChanges()", navprop2 is ok, but navprop1 is set null and throw exception of null foreign key.
Help! :-)

I was going to
post
the solution
when
I read
your response, the system
of the forum
do not
yet
notified
me
the answer,
but thanks for
the
reply.

Similar Messages

  • My wife set up 2 phones using 1 itunes account, this is not longer working for us, I have set up new itunes account on my computer, but how do I change it on the phone with out loosing data

    Hello, when our phones were purchased the wife set up both to her itunes account, We have since set up 2 laptops, and now have setup my own itunes account on that laptop.  How do I change the phone account to match, Do I loose data? at the moment there are no apps or music or docs, but I dont want to loose messages, or contacts.  We have turned of auto sync on itunes on the laptop.  So I need to backup the phone, then do a ios upgrade to the phone as I am on v6.1.3  The wifes is all up to date on her laptop, but mine is so far behind and I am nervous about taking the next step.  Please describe step by step.

    ThisGal_Drea wrote:
    i have my iphone set up with itunes on one computer, but i recently bought my own computer. How do I set up my iphone with the new itunes account?
    Do you mean iTunes library?
    iTunes account is what you use to make iTunes purcahses.
    iTunes library is what is on your computer.
    It says my phone can only be set up woth one itunes account. How do I remove the previous account?
    No, it tells you it can only be sync'd with one iTunes library.
    Simplest way is to copy the entire /Music/iTunes/ folder (thisis the iTunes library) from old computer to new computer.

  • I have macbook pro 13.3 inch ..mac os lion 10.7.5   i want to tranfer data from macbook to external hard disk  without loosing data which in already in extrnl drive

    i want to take back up of my macbook . so i have external hard disk around 1 tb and already have 230 used ...when i transfer manually with out time machine ....because i want to tranfer into windows .....so how to change ntfs into fat32 without loosing data in external harddisk ?

    You don't have to change NTFS to FAT.
    Just install Paragon NTFS and you'll be able to transfer your data to your external HDD even if it is NTFS.

  • I am using i 4 phone. recently I had a problem with my lap top and had formatted hard disk of it. Now I want to use sync data in my iphone back to itune n my lap top. how can I perform this task with out loosing data in my i phone.

    I am using i 4 phone. recently I had a problem with my lap top and had formatted hard disk of it. Now I want to sync data in my iphone back to itune on my lap top. how can I perform this task with out loosing data in my i phone.

    Hey floridiansue,
    Do you have an installed email program such as Microsoft Outlook?  If your email is through an online login, such as Gmail, etc, then one will have to create an email association with a program such as Microsoft Outlook on the PC for this Scan to Email system to function.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    I am not an HP employee.

  • How to convert NTFS external hard drive to FAT32 without loosing data?

    New mac user. How to convert NTFS external hard drive to FAT32 without loosing data?

    You have to off load and backup then.
    don't have backup drive ?
    Get one.
    Want another option? Paragon NTFS for OS X will provide write function to your drive, works with the most PC cases and drives (not all NTFS drivers for OS X do) and does so with fast I/O and low overhead.
    Not sure about using Seagate GoFlex as I seem to recall a number of threads reporting problems.
    Windows can do a convert -fs to NTFS just never tried the reverse from NTFS to FAT32 but I would not use FAT. I'd either erase and reload and use as Mac HFS Extended; or if you actually do need to use it with a PC user running Windows, the driver would be handy and better.
    Or your PC w/ Windows there are HFS drivers for Windows to mount and WRITE to a Mac formatted drive under Windows. There MacDrive has more and better support feature set.

  • I was updating software and suddenly my IPHONE  started asking for I tunes on mobile screen ,  how can  i  get by screen back or How i can restore without loosing data , I m more worried about data , Please help in resolutio

    i was updating software and suddenly my IPHONE  started asking for I tunes on mobile screen ,  how can  i  get by screen back or How i can restore without loosing data , I m more worried about data , Please help in resolutio

    What exactly are you seeing on the phone's screen ? If the iTunes icon and cable then the phone is in recovery mode, in which case it's too late to take a new backup or to copy any content off the phone - you will have to connect the phone to your computer's iTunes and reset it back to factory defaults, after which you can restore to the last backup that you took or just resync your content to it

  • Loose data

    Hello,
    I acquire data from 2 device 6025E by sharing the scan clock. But I have some problem to save data on DIADEM.
    I loose datas. For example, with a test during 2mn30, I have only a duration of 2mn15 on DIADEM. Moreover, I loose data during all the test not only at the beginning or at the end.
    I think it s a problem with the buufered acquisition but I don t know why.
    To have an acquisition at 1000 Hz, my parameters are scan rate 1000, buffer size 10000 and Number of scan to read 1000.
    I joined my VI in file attachements.
    Thanks for your help.
    Attachments:
    Essai-Temp+BNC-V1.vi ‏730 KB

    Hi,
    Are you losing data if you save the file as a comma separated file as well? From your program I can see that you can select if you want to store the results in DIAdem format or in text format.
    It seems to me that the problem is related to the way you are acquiring data. You are doing a buffered finite acquisition in a loop. A better option will be to do a continous acquisition so there won't be gaps between loop iterations. I highly recommend you check the example built in LabVIEW Cont Acq&Chart (Buffered.
    Best Regards,
    Alejandro
    Ni

  • How do I update I pad on a new computer without loosing data. Old computer got virus and it's got my I tunes account on it.

    How do I update I pad on a new computer without loosing data. Old computer got virus and it's got my I tunes account on it.

    You simply sync the iPad to the new computer. It will tell you that it is already synced with another one though, and will give you the option to erase it or transfer its contents to the new one. An iPad can only be synced with one computer at a time.
    Beware that only your iTunes and App Store purchases will sync. If your iTunes library contained music obtained from other sources, you have to find a way to transfer them directly from your sick computer to the new one.
    I hope your new computer is a Mac, a replacement PC will eventually suffer the same fate.

  • Will I loose data if I delete ios 7

    Well Apple is now using Microsoft's business model of launching new platforms before they work.  iOS 7 is a disaster on many levels; i. e. many functions as basic as blue tooth no longer function, Evernote app problems, UGLY, and no easy solutions to anything.  It makes me wish I had NOT singed a contract on a iPhone 5.  How can I get rid of the new iOS 7 without loosing data?  When I read the forums it seems way too complicated and there are horror stories about lost data which I cannot afford to do.  What a mess you guys are making of the Apple brand and reputation.

    You cannot downgrade the OS without breaking the system and your warranty. Period. That's the way the cookie crumbles and the way it will crumble until Apple says otherwise. So, like all of us users, either learn how the new system works and how to do things in this new World Order, or use your freedom to move on to another platform.

  • I now have an iphone4s, my old iphone4 is still listed as being backed up in may, can I delete this or will I loose data from my 4s? Thanks

    I now have an iphone4s, my old iphone4 is still listed as being backed up in may, can I delete this or will I loose data from my 4s?

    Welcome to Apple Support Communities
    You can delete that backup. You won't lose anything, as it's from an old iPhone and you are not taking files from that backup because your iPhone is being backed up to a different backup

  • If I update my iPad 2 to ios7 will I loose data eg photos?

    If I update my iPad to iOS 7 will I loose data (eg photos & videos)?

    Nothing should be lost, but it is both Prudent and Recommended to Backup before any major Update.
    How to BackUp  >  http://support.apple.com/kb/ht1766
    What gets Backed Up
    iTunes http://support.apple.com/kb/ht4946
    iCloud http://support.apple.com/kb/PH2584
    penny161 wrote:
    If I update my iPad to iOS 7 will I loose data (eg photos & videos)?
    Do the update using iTunes on the Computer you usually Sync and Backup to.
    See the Using iTunes Section Here...
    How to update your iPhone, iPad, or iPod touch

  • Garage Band looses data!!!

    Hi all,
    Since about 2-4 month my Garage band looses data, when saving a project. This includes booth, system loops, imported mp3s and recorded data. When taking a lock into the project folder xxxxxx.band the subfolder "Media" is emty. Unfortunately it does not help to make regulary backups, because you can not recognise when Garageband starts to loose data. This data loss occurs after saving the project and leaving the softwware. When reopening it, you cannot find about 2/3 of the project any more. This seems to bee abitrary which tracks are lost. Exporting on disc and iLife preview works before closing the project.
    You can also see the data loss in the GUI: http://dl.dropbox.com/u/3739719/Bildschirmfoto%202010-11-26%20um%2011.29.22.png
    I hope somebody can help me. I like my Garage Band very much, but in the current state ist sems to be unuseable.
    My system is:
    MacBook4,1
    Mac OS X 10.6.5 (10H574)
    iLife09
    best regards, hoping for some solution,
    Andy
    Message was edited by: arjj1978

    Have you restarted the Mac after downloading the in-app purchase?
    After you installed then-app purchase, you should see the additional lessons in the Lesson Store for download. They will not appear directly in the "Lear to Play" section. You have to download them as well.
    In the "Lesson Store" window, check, if your account is set correctly, and if the country is correct.

  • Loosing data from memory card

    hi, iam new to this community, i bought my nokia 5800 1 week back, im now facing a problem with memory card. 2 days back i lost a folder with ring tones, and yesterday i lost a movie. i dont know why it is happening. i dont want to loose ant data furthur, what can i do prevent loosing data. i dont think it is not due to my fault. plz help me. thanq in advance.

    If the format didnt do any good then its the time for replacement, accessories have 6 months warranty you can very well demand for a replacement, visit a nearest Nokia care center with the proof of purchase
    If a reply has solved your problem click Accept as solution button, doing it will help others know the solution. Thanks.

  • Will i loose data, in outlook mails  when i upgrade from OS X 10.9.5 to Yosemite

    i am using a mac pro late 2013 version. at presen have os x 10.9.5, looking forward to update to OS yosemite. i am afraid that i would loose my data in my computer, especially will my outlook mails will be deleted . need to know wether we will loose data while upgrading the OS.

    A few users have reported data loss while upgrading Mac OSX or even after updating Office. So, the best practice would be to export all email data in OLM format using outlook and also to save a copy of Microsoft User Data folder with Main Identity at a separate location such as a portable Hard drive and then only update the Mac OSX or outlook. This way if you face any issues, you have an option to go back to mavericks and get the things working exactly as they are now or alternately recover emails from the backup if you wish to stay on new OS.
    I also upgraded to Yosemite and lost many outlook files and folders. I did not had any backups and was stuck completely. I researched and came to know that outlook stores messages in olk14 format. Then, I looked online for olk14 message recovery as I had some very important emails downloaded in outlook and didn't expect it to stop functioning by just upgrading Mac OSX. However, at a later stage I was able to recover messages from olk14 format. Though it costed a bit, but I was happy to get my email messages back.

  • Can an Apple store restore my iPod without loosing data?

    Can an Apple store restore my iPod without loosing data?

    The only way to unlock it is to follow the steps in http://support.apple.com/kb/HT1212 or one of the similar knowledge base articles, which includes restoring the device.  If you have a current backup you can do that and remove the passcode.

Maybe you are looking for

  • Why is Messages no longer showing up under my iCloud account in the "Internet Accounts" window?

    Why is Messages no longer showing up under my iCloud account in the "Internet Accounts" window?  I recently deleted it and added it back, but then Messages went away.  On my iPhone, it shows me logged in under my iCloud account and my cell phone numb

  • Absolute Value in Transformation level

    Hi Team, I want to insert abolute value in Transformation routine level.Pl provide me the routine code to instert absolute value of Exchange Rate. I have tried to put below code but its not working. ABS(Exchange Rate). Regards Ramakanth.

  • Number of records in SETUP table

    Hello I am working with PO extractor. Is the number of records in XXXXXXSETUP table equal to the number of records setup?

  • PXI-6682 + multiple Serie S & M cards cause timestamp delay

    I'll try to give as much info as possible and hopefuly someone will have an answer to this problem. Language: C++ Introduction: 1- I have (1) PXI-6682 (Timing card), (6) PXI-6143 (Serie S (8 analog inputs each)), and (2) PXI-6224 (serie M (8 analog i

  • ICWebclient: Configuration :

    hi , i have configured the ICWebclient in the CRM installation. after all the tasks when i click on the URL's to verify Server and Dispatcher i am able to check the Dispatcher link but i am not able to check the server one. it is: http://crmserver:50