Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Post
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Reply
Why the result is returning only 1 column instead 2 column?
Patrick Pangilinan
7 years ago
313
Reply
from TRAN_S in (
from x in (
from x in _context.DwPropertyDetails
where
x.LandId == 2 &&
x.TransactionPrice != null &&
x.FlatType == "Studio"
select new
{
TRANSACTION_PRICE =
x.TransactionPrice ?? (long?)0,
ACTUAL_SIZE = x.ActualSize ?? (long?)0,
rank = 0 + 1
})
where
x.rank == 1
select new
{
TRAN_S = (int?)x.TRANSACTION_PRICE ?? (int?)0
})
from PER_FT_S in (
from x in (
from y in _context.DwPropertyDetails
where
y.LandId == 2 &&
y.TransactionPrice != null &&
y.FlatType == "Studio"
select new
{
PER_FT_S =
y.TransactionPrice / y.ActualSize ??
(long?)0,
rank = 0 + 1
})
where
x.rank == 1
select new
{
PER_FT_S = (int?)x.PER_FT_S ?? (int?)0
})
select new
{
TRAN_S,
PER_FT_S
};
Must return TRAN_S and PER_FT_S column
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to convert sql to linq using C#
xamarin forms shared projects