A
A
authoraytee2020-08-12 09:56:14
MySQL
authoraytee, 2020-08-12 09:56:14

How to get name by id?

I have a table of orders that stores customers through foreign keys
. Id is passed, everything else is not, so I can’t get something from the customer table.
How can I get an object or something like that?
5f33920ca252e761401889.png

Customers:

public class Customer
    {
        public int Id { get; set; }
        public string CustomerName { get; set; }
        public string Contragent { get; set; }
        public string PhoneNumber { get; set; }
        public bool Delivery { get; set; }
        public bool IsCashless { get; set; }
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tsiren Naimanov, 2020-08-13
@ImmortalCAT

Here are examples of loading data
Loading Related Entities

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question