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
Guest User
Tech Writer
611
129.3k
Get only Matching record.
Sep 28 2020 5:02 AM
I have get record from three table using linq c# .it's working fine but i have face issue i want to get record based on id and status .I have use this query
var Fav = (
from
FV
in
_context.TblFavUserVideo
join
VM
in
_context.TblVideoMaster
on
FV.FileId equals VM.FileId
into
VMs
from
VM
in
VMs.DefaultIfEmpty()
join
EV1
in
_context.TblEducationalVideo
on
FV.EducationalImageId equals EV1.EducationalId
into
EV1s
from
EV1
in
EV1s.DefaultIfEmpty()
join
EV
in
_context.TblEducationalVideo
on
FV.EducationalVideoId equals EV.EducationalId
into
EVs
from
EV
in
EVs.DefaultIfEmpty()
where
FV.UserId == obj_parameter.UserId && FV.IsFav== obj_parameter.Status || VM.VideoFavStatus ==
true
|| FV.SubCategoryVideoFavStatus ==
true
|| FV.EdcuationalImageStatus ==
true
|| FV.EdcuationalVideoStatus ==
true
select
new
{
FV.FavId,
FV.IsFav,
FV.UserId,
FV.SubCategoryVideoFavStatus,
FV.EdcuationalVideoStatus,
FV.EdcuationalImageStatus,
FV.UpdatedDate,
VM.FilePath,
VM.VideoTitle,
VM.VideoDescription,
EV.Title,
EV.Description,
EV1.ImagePath,
ImageTitle = EV1.Title,
Desc
= EV1.Description,
EV.EducationalId,
EV.VideoPath
}).ToList();
I will send
{
"UserId"
:37,
"Status"
:1
}
this param .But here all record showing for e.g total 80 record in my table loop are 80 time run.So my api very late response .Please resolve this issue
Reply
Answers (
2
)
About Linked Servers
Create a Web Page using Razor without Entity Framework.