TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Patrick Pangilinan
NA
4
619
Why the result is returning only 1 column instead 2 column?
Feb 2 2017 10:58 PM
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
Reply
Answers (
1
)
How to convert sql to linq using C#
xamarin forms shared projects