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
Sasi Reddy
NA
346
225.9k
Function with var return type
Aug 13 2014 7:13 AM
I have a query like below
i need to implement this in function means
it should return PID ,PNAME to controller
how to write function in a class to return this..
var subactivityid = (from records in db.PLANNING_DATASHEET
where planningid.Contains(records.PLANNING_ID)
select new { PID = records.PLANNING_ID, PNAME = records.SUBACTIVITY_MASTER.SUBACTIVITY_NAME }).ToList();
var subactivityid = (from records in db.PLANNING_DATASHEET
where planningid.Contains(records.PLANNING_ID)
select new { PID = records.PLANNING_ID, PNAME = records.SUBACTIVITY_MASTER.SUBACTIVITY_NAME }).ToList();
ViewBag.SUBACTIVITY_ID = new SelectList(subactivityid, "PID", "PNAME");
I am binding dropdown like above.
but i need like this instead of linq
var subactivityid=far.getSubactivity(Planningid);
Reply
Answers (
1
)
Send way2sms from desktop application
how can get difference between two dates