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
sreepathy s prabhu
NA
217
101.1k
how to take value from array from mongodb collection
Jun 23 2015 7:21 AM
how to take value from array from mongodb collection and am using mvc
public class PaydeskUser
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string id { get; set; }
[Required]
[DataType(DataType.EmailAddress)]
public string Email { get; set; }
[Required]
public string Password { get; set; }
[Required]
public string CompanyName { get; set; }
[Required]
public string IndustryName { get; set; }
[Required]
public string Address { get; set; }
[Required]
public string ZipCode { get; set; }
[Required]
public string City { get; set; }
[Required]
public string RegisteredDate { get; set; }
public string ContactPerson { get; set; }
[Required]
public string Status { get; set; }
public string Licence { get; set; }
public string OrganizationNumber { get; set; }
public List<User> Users { get; set; }
}
public class User
{
public User()
{
PayDesks = new List<Paydesk>();
}
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string id { get; set; }
public string Name { get; set; }
public string Email { get; set; }
public string Password { get; set; }
public string Phone { get; set; }
public string Status { get; set; }
public string Date { get; set; }
public string ProfilePicture { get; set; }
public List<Paydesk> PayDesks { get; set; }
}
i want to take value from User
And in controller i wrote this
try
{
var database = PosConnection.GeniusPayDB;
var collection = database.GetCollection<User>("Company");
return collection.AsQueryable<User>().ToList();
}
catch
{
throw;
}
what will be the mistake i had done
Reply
Answers (
0
)
Assigning sql query data values in kendo pivotgrid
Microsoft.ace.oledb.12.0 drivers