11
votes
1answer
4k views

thread messaging system database schema design

I'm trying to achieve exactly what's explained here: Creating a threaded private messaging system like facebook and gmail, however i don't completly understand Joel Brown's answer. can any one ...
0
votes
1answer
39 views

LINQ left join only works in the ActionResult

I'm trying to get up to speed with MVC, linq, razor, etc. Some things are working and others I just hit dead ends that really discourage me. This is the first one I haven't been able to work out. ...
0
votes
3answers
49 views

LINQ - “Unable to create constant value of type [type]”?

Here's my error Unable to create a constant value of type 'Courses.Model.Track'. Only primitive types or enumeration types are supported in this context. and here's the code that causes it: ...
0
votes
1answer
44 views

Linq sum value filtered by datetime

in my system user choose start time and end time and then my system show user sum of total prices between this date time. TotalRate = room.Prices.Where( hrp => hrp.ValidStartAt<= ...
0
votes
1answer
24 views

Given a DateTime, how to Call .ToUniversalTime when using LINQ to NHibernate?

I have a method which returns all the events based on an EventTypeID: public IList<Event> FindAll(int eventTypeId, DateTime? modifiedSince) { IQueryable<Event> query ...
2
votes
2answers
66 views

Not able to view the latest file from a directory in ASP.NET

I need to get the latest file from a directory, so using LINQ I got the file name and gave that file path as a link. When I click the link the file opens. But the problem happens when I click the link ...
-2
votes
0answers
17 views

NavigateURL in asphyperlink not working

My code here: <dx:ASPxHyperLink ID="hplBooking" runat="server" Text="Booking" NavigateUrl='<%# Eval("TL_Id","Details.aspx?Id={0}") %>' Cursor="pointer" ></dx:ASPxHyperLink> When ...
0
votes
0answers
39 views

Get TableRow array class from DataTable using LINQ

I want to convert the code below to a TableRow[] array using LINQ and add it to a main Table class. foreach (DataRow dr in dt.Rows) { TableRow tr = new TableRow(); ...
0
votes
2answers
28 views

How to exclude folders when using Directory.GetDirectories

I want to return a list of all the subdirectories in the 'SomeFolder' directory excluding the 'Admin' and 'Templates' directories. I have the following folder structure (simplified): ...
1
vote
1answer
86 views

How can I speed this LINQ query up?

I know that there's a much more efficient way to do this, using predicates, but being fairly new, I'm not sure exactly how to go about it.. List<HousingAssignment> list; using (OEContext ...
0
votes
1answer
44 views

Order Subgrouping in Linq Query

I have a problem with a Linq query. I have a query formatted like the following which returns a result set that is grouped by the top level and is ordered by the top level strings alphabetically. I ...
0
votes
2answers
49 views

Linq to Entities - OrderBy Tags (many to many relationship)

asp.net mvc 4, Entity Framework 5, SQL Server 2012 Express, Code First I have a Place model: public virtual int PlaceID { get; set; } public virtual ICollection<Tag> Tags { get; set; } public ...
1
vote
1answer
106 views

How to split a string in a datatable and add into new rows using Linq C#?

I am new to linq. I am using linq to get vlaues from datalist control and creating a datatable with that values. The datatable contains three columns. In that, sometimes the 'Answer' column is having ...
0
votes
2answers
40 views

How to load two SQL Tables into dataset and how to bind it to ListView?

How to bind the tables to the ListView and which control should be used LinqDataSource or ObjectDataSource,what should be the DataSourceID for the ListView My ListView Is <asp:ListView ...
3
votes
2answers
55 views

Select rows from a table according to indexes on other list

Let's see if you can help me. I'm not very good at LINQ, so I don't even know if it is possible. Actually, I think it is, but I couldn't find yet the best way to do it. I have an object that has a ...

1 2 3 4 5 153
15 30 50 per page