I have a table structure with relationship in between three tables.
I have added edmx file into my project as below.
I would like to use parameter array navigation properties entity framework using linq.
I have written some code in controller like
- <Expression> parames1 = v => v.LoginInfo;
- <Expression> parames2 = v => v.LoginInfo.UserDetail;
- <Expression> [] paramesArray = new Expression>[] { parames1, parames2 };
- var userPost = UnitoffWork.UserPostRepository.GetAll(navigationProperties: paramesArray).Select(u => new HomeViewModel(u));
I am not able to implement this.
getting some errors like
1. parames1 does not exist.
2. can not create an instance of abstarct class or interface 'System.Linq.Expressions.Expression'
Please suggest how can i get all data in single variable from mutliple tables.
Thanks