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
Rohan Ramani
NA
786
144.9k
How to copy one list to another list using linq?
Apr 15 2020 3:17 AM
Hi All I have two class
public
partial
class
UserMaster
{
public
Guid UserId { get; set; }
public
string FirstName { get; set; }
public
string LastName { get; set; }
public
string Email { get; set; }
public
int
RoleId { get; set; }
public
bool
Status { get; set; }
public
string PasswordSalt { get; set; }
public
string PasswordHash { get; set; }
public
DateTime CreatedDate { get; set; }
}
And
public
class
RMangerViewModel
{
public
Guid UserId {
get
;
set
; }
public
string
FirstName {
get
;
set
; }
public
string
LastName {
get
;
set
; }
}
Basically Manager is from
UsereMaster
but identify by
RoleId
=3.
I need to fill
RMangerViewModel
from
UserMaster
where
RoleId
= 3 using linq.
Note: List of
UserMaster
will be fill up by
_context.UserMaster
.
Reply
Answers (
2
)
i am having problem in nested loops
How to Add Row Number Column in Select query