This is my first question not in stackoverflow only but the whole in internet. I have a wpf project with Entity Framework 6 EF6 model auto-generated from Sql server database. I have the following class:
public partial class SA_EMPLOYEE
{
public int EMPID { get; set; }
public string FIRST_NAME { get; set; }
public string LAST_NAME { get; set; }
}
//then I added a custom property
public partial class SA_EMPLOYEE
{
public string FULL_NAME => $"{FIRST_NAME} {LAST_NAME}";
}
I have a list box binding to myDbContext.SA_EMPLOYEE.ToList()
and is showing the FULL_NAME
property and some controls binding to selected item.
When I show the FIRST_NAME
in the listbox it changed immediately if I change it in the textbox but not for FULL_NAME
. Any work around to notify property changed for FULL_NAME
if any of FIRST_NAME
or LAST_NAME
has changed.
I saw a similar question here.
Thanks for anyone could help.