Tagged Questions
0
votes
1answer
61 views
How to make cumulative search with LINQ
If i want to search by req_ser ,req_year .. ,so on fields
I do the following :
if (obj.RequestSerial != 0)
{
if (condition != "")
...
0
votes
1answer
34 views
Wildcard search in using Lamda in EF
I have a search with optional arguments:
string id1 = HttpContext.Current.Request["id1"];
string id2 = HttpContext.Current.Request["id2"];
List<Foo> list = context.Foo.Where(l =>
...
0
votes
2answers
42 views
Insert new row in gridview by specific value
I'm using Devexpress tool anyone please help me?
I'm using Devexpress tool to develop my website. But i have some problems so i hope anyone could help me. I really need it in my project. Please see ...
0
votes
3answers
53 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
27 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
0answers
20 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
2answers
46 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
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();
...
2
votes
2answers
72 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 ...
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
45 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 ...
1
vote
1answer
107 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
50 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 ...
3
votes
2answers
56 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 ...