Answer the question
In order to leave comments, you need to log in
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?
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
Here are examples of loading data
Loading Related Entities
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question