Ask Sawal

Discussion Forum
Notification Icon1
Write Answer Icon
Add Question Icon

Teruyuki Lamore

Posted Questions


Posted Answers


Asking questions is key to good communication with your doctor. If you don't ask questions, he or she may assume you already know the answer or that you don't want more information. Don't wait for the doctor to raise a specific question or subject; he or she may not know it's important to you. Be proactive. Ask questions when you don't know the meaning of a word (like aneurysm, hypertension, or infarct) or when instructions aren't clear (for example, does taking medicine with food mean before, during, or after a meal?).

Sometimes, doctors need to do blood tests, X-rays, or other procedures to find out what is wrong or to learn more about your medical condition. Some tests, such as Pap tests, mammograms, glaucoma tests, and screenings for prostate and colorectal cancer, are done regularly to check for hidden medical problems.

Before having a medical test, ask your doctor to explain why it is important, what it will show, and what it will cost. Ask what kind of things you need to do to prepare for the test. For example, you may need to have an empty stomach, or you may have to provide a urine sample. Ask how you will be notified of the test results and how long they will take to come in.

When the results are ready, make sure the doctor tells you what they are and explains what they mean. You may want to ask your doctor for a written copy of the test results. If the test is done by a specialist, ask to have the results sent to your primary doctor.

A diagnosis identifies your disease or physical problem. The doctor makes a diagnosis based on the symptoms you are experiencing and the results of the physical exam, laboratory work, and other tests.

If you understand your medical condition, you can help make better decisions about treatment. If you know what to expect, it may be easier for you to deal with the condition.

Ask the doctor to tell you the name of the condition and why he or she thinks you have it. Ask how it may affect you and how long it might last. Some medical problems never go away completely. They can't be cured, but they can be treated or managed.

Your doctor may prescribe a drug for your condition. Make sure you know the name of the drug and understand why it has been prescribed for you. Ask the doctor to write down how often and for how long you should take it.

Make notes about any other special instructions. If you are taking other medications, make sure your doctor knows what they are, so he or she can prevent harmful drug interactions. Check with your doctor's office before taking any over-the-counter medications.

Let the doctor know if your medicine doesn't seem to be working or if it is causing problems. If you want to stop taking your medicine, check with your doctor first.

You may find it helpful to keep a chart of all the medicines you take and when you take them. Download, print, and copy the Medications worksheet.

Get answers to commonly asked questions about medicines and learn more about how you can save money on costly prescriptions.

Learn tips to help you remember the doctor’s instructions.

Answer is posted for the following question.

How to ask doctor for blood work?


  • Make sure that the microphone or headset is connected correctly to your computer.
  • Make sure that the microphone is positioned correctly.
  • Increase the volume of your microphone. Here's how to do this in Windows 10: Select Start , then select Settings > System > Sound .

Answer is posted for the following question.

How to fix microphone in laptop?


Foreign keys are used to represent relationships in an Entity Framework Core model. A domain key is a set of properties on a relationship's dependent or child entity. When the foreign key properties on the child or child match the values of the primary or alternate key properties on the parent or principal, the child or child entity is associated with that parent or parent entity.

Foreign keys are a good way to store and manipulate relationships in the database, but they are not very easy to use when working with multiple related entities in your application code. The "navigations" on top of the FK rendering are included in most EF Core models. There are C#/.NET references between entity instances that reflect associations found by matching foreign key values to primary or alternate key values.

Only one side of the relationship can be used with navigations, leaving the other side to be decided. A shadow property can be used to hide the FK property. Modeling relationships is more information that you can see.

There are four entity types with relationships in the model. Foreign keys, primary keys, and navigations are indicated by the code comments.

Three relationships are in this model.

Modeling and configuring relationships can be found in Relationships.

The navigations are aligned with foreign key values. If a foreign key value changes and references a different parent or parent entity, the navigations are updated to reflect the change. If a navigation is changed, the foreign key values of the entities involved are updated to reflect the new navigation. This is called relationship correction

When entities are queried from the database the fix occurs.

The database only has foreign key values, so when an instance of an entity is created from the database, it uses the foreign key values to set the reference navigations and add entities to the collection navigations as appropriate. For example, consider a query for the resources and posts of a blogs

The first instance of a blog will be created by the Core. As each entry is loaded from the database, the Post.Blog navigation reference is set to point to the associated blog.

The post is added to the collection. In this case, both navigations are references. The resource instance is set to be pointed to in the BlogAssets navigation.

The change tracking debug view shows two blogs, each with a resource and two tracks.

Key values and navigations are shown in the view. The navigations are displayed using the primary key values. The above output shows that the navigation for the Blog.Posts collection contains two related posts with primary keys 1 and 2.

For each post associated with the first one, the line indicates that the post is related to the one with the primary key.

The entities returned from a trace query are tracked by the DbContext. Consider running three separate queries for resources.

After the first query only the two blogs are tracked.

The context doesn't track any associated entities, so the reference navigations for theAssets are null.

The reference navigations have been changed to point to recent tracked instances. The reference navigations are set to point to the already crawled instance.

After the third query, the navigations for the Blog.Posts collection now contain all related posts, and the Post.Blog references point to the appropriate Blog instance:

The final state that was achieved with the original single query is the same as the one that has been fixed by the EF Core.

The easiest way to change the relationship between two entities is to manipulate a navigation, while leaving the rest of the code to fix the reverse navigation and FK values correctly. This can be done in a number of ways.

Let's move one of the Visual Studio posts to the.NET post. This requires first loading the posts and then moving the post from the navigation collection to the other one.

This is the view that was printed after the above code was run.

There are three entries in the.NET post navigation. There is only one entry in the navigation of the Visual Studio blog. The code explicitly changed these collections.

The code hasn't explicitly changed the navigation of the Post.Blog, but it has been corrected to point to the Visual Studio blog. The foreign key value has been updated to match the primary key value. When SaveChanges is called, this change in the value of FK en is persisted in the database.

A post was moved from one website to another by changing the navigation on each website.

To achieve the same thing, change the Post.Blog reference navigation to point to the new one. For example,

The previous example shows the same view after this change.

The reference navigation change was detected by the Core and then corrected to match the collection navigations.

In the previous section, relationships were manipulated using navigations that let foreign key values update automatically.

The recommended way to manipulate relationships is this. It is possible to manipulate the values directly. Changing the Post.BlogId foreign key value can help us move a post from one site to another.

This is similar to changing the reference navigation, as shown in the example above.

The previous two examples have the same view after this change. The reference and collection navigations were corrected after the FK value change was detected.

The following actions are performed when a new dependent or child entity is added to the collection navigation.

We can see that moving a post from one site to another doesn't require removing it from the old collection navigation.

The code in the example above can be changed.

A: Yes.

The post has been added to a new blog and removed from the collection on the first one.

The relationship between the parent or principal and the child or child entity is broken when that entity is removed from the collection navigation. The relationship is optional or required.

The foreign key value is set to zero. The child or child is no longer associated with the parent. Let's remove one of the posts from the collection navigation and load a new one.

After this change, the change tracking view shows that.

The post is not marked as deleted. When SaveChanges is called, the value of the database is set to null.

It is not possible to set the value of FK to zero. When SaveChanges is called, the child entity must be removed from the database or re-parented to a new parent to avoid a referential constraint violation. This is the default behavior for required relationships.

Let's change the relationship between the two to be required, and then run the same code as in the previous example.

The view after this change shows that.

The Post.Blog id object cannot be set to null, so it remains the same.

The orphaned post is removed by calling Save Changes.

As soon as the relationship change is detected, orphans will be marked as deleted. This process can be delayed until Save Changes is called.

If you want to avoid orphaning entities that have been removed from a parent, but will be recreated with a new parent, this can be useful. This time is set by ChangeTracker.DeleteOrphansTiming. For example,

The object is not marked as deleted after unpublishing the first collection. The relationship has been severed even though it is required. Even though the type is non-nullable, the value of FK is null. "conceptual null" is what it is called.

The post would be deleted if SaveChanges was called.

If the post is associated with a new blog before SaveChanges is called, it will be fixed and will no longer be considered an orphan.

Save Changes will update the post in the database instead of deletion.

Automatic deletion of orphans is possible if you enable it.

If Save Changes is called, this will throw an exception. This code is used for example.

This exception will be thrown by it.

Cascading deletions and orphan deletions can be forced at any time by calling ChangeTracker.

If the orphan deletion time is combined with the setting of the deletion time to Never, orphans will be never deleted.

Answer is posted for the following question.

How to make fk switch?