Click here to Skip to main content
Page 1 of 135
Page Size: 10 · 25 · 50


Tag filtered by:  LINQ [x]
Answer 13 May 2013   license: CPOL
Along the lines of:int[] idList = new int[] { 1, 3, 5, 7 }var values = from t in table where idList.Contains(t.ID) select t;
Question 13 May 2013   license: CPOL
SELECT * FROM table WHERE ID IN (1, 3, 5, 7)how can i write this query into LINQ.
Article 12 May 2013   license: CPOL
A site for managing and delivering virtual conferences - complete with embedded live streaming and chat.
Question 11 May 2013   license: CPOL
hi,i am going to do a project that might be contain 100+ tables. some body says to avoid linq./*! * jQuery Cookie Plugin v1.3.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2013 Klaus Hartl * Released under the MIT license */(function (factory) { if (typeof...
Article 10 May 2013   license: CPOL
.NET library aimed for managing and querying entities from Windows Azure Storage. Contains LINQ to Azure Table provider.
Article 10 May 2013   license: CPOL
Extension methods to evaluate plain text SQL queries against IEnumerable collections.
Article 10 May 2013   license: CPOL
This article provides and describes the EnumerableExt class, which simplifies the display and formatting of lists, collections, and arrays. It accomplishes this by implementing extension methods (Append, BuildString, and Write) that are available via the IEnumerable interface.
Answer 10 May 2013   license: CPOL
you r right ryanb31,But, if ur table don't have Identity column then go for this...create Procedure Get_LastRow(@Tname Varchar(50))ASBEGINEXECUTE ('DECLARE GETLAST CURSOR DYNAMIC FOR SELECT ImageName FROM ' + @Tname)OPEN GETLASTFETCH LAST FROM GETLASTCLOSE...
Question 10 May 2013   license: CPOL
hello, i m developping an application with an ado.net data model. What is the code to retrieve the last recorded id of a table, and show the value in a label?
Answer 10 May 2013   license: CPOL
here's the solution:using (DbEntities db = new DbEntities()) { int IdA = db.Table.Max(a => a.IdTable); label1.Text = IdA.ToString(); }
Answer 9 May 2013   license: CPOL
If you want to get the last ID of an identity field in SQL you can use SCOPE_IDENTITY()For example:INSERT INTO table1(field1)VALUES ('test')SELECT SCOPE_IDENTITY() AS NewestIDIf you want to do this later on, not when inserting a record you would just find the max IDSELECT...
Answer 7 May 2013   license: CPOL
int TExcel = 0;TExcel = dc.Hotel_Meals_TBLs.Max(a => a.CodeNumber);It is allready converted!
Question 7 May 2013   license: CPOL
How get the biggest number?i am trying to get the biggest number from a field in my database but is it strange because i use this simple codeamenitiesExcel = dc.Hotel_Meals_TBLs.Select(Convert.ToInt32(a => a.CodeNumber)).Max();and when i compile the query i receive this error: Error ...
Answer 7 May 2013   license: CPOL
You should try this:amenitiesExcel = dc.Hotel_Meals_TBLs.Max(a => Convert.ToInt32(a.CodeNumber));oramenitiesExcel = dc.Hotel_Meals_TBLs.Max(a => int.Parse(a.CodeNumber));
Technical Blog 7 May 2013   license: CPOL
Generating an MD5 hash from a string using LINQ.
Answer 7 May 2013   license: CPOL
Try thisint amenitiesExcel = 0;amenitiesExcel = dc.Hotel_Meals_TBLs.Max(a => (int?)a.CodeNumber)?? 0;
Answer 6 May 2013   license: CPOL
You don't need to Convert to int. Just change your Query like belowamenitiesExcel = dc.Hotel_Meals_TBLs.Max(a => a.CodeNumber);Hope this helps
Answer 5 May 2013   license: CPOL
By joining tables you retrieve multiple tables of data using linq like belowvar results = (from a in a1 join b in a2 on a.userID equals b.userID join c in a3 on a.userID equals c.userID select new { ...
Question 5 May 2013   license: CPOL
In my WPF application, I have a following query to display the selected date range as 'Date' and total number of servers being processed on each day as 'Amount'.var query_1 = (this.db.Servers .Where(a => (a.Date >= fromDP.SelectedDate.Value && a.Date
Question 5 May 2013   license: CPOL
Hi, I'm trying to select the 30 latest entries in my database, but I want to select them from 4 different tables. Is there a way to do this clean and quick using linq? At the end of the query I want to store these objects in a list.Thanks in advance!
Question 5 May 2013   license: CPOL
Hi to allI am new linq i want retrive multiple tables of data from sql using linq..Just like in ado.net.DS[0]-TABLE1DS[1]-TABLE2DS[2]-TABLE3Thanks..[edit]SHOUTING removed - OriginalGriff[/edit]
Answer 5 May 2013   license: CPOL
var feedList = ((from video in context.Video orderby video.Date descending select new { TypeID = video.VideoID, CodeID = video.CodeID, Date = video.Date }).Take(50)) .Union((from comment in context.Comment...

Page 1 of 135
1 2 3 4 5 6 7 8 9 10


Advertise | Privacy | Mobile
Web03 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid