Search in aa
Search in fr
Search in en
Search in de
Search in es
Search in it
Search in ru
Search in pl
 
223 047 news providers
20 623 101 news indexes
1 675 533 multimedia files
"general" : 116 results during the last 30 days
Your search in 0.138 s

03 Dec
12 : 28
LINQ to SQL BETWEEN a AND e
I have some LINQ to SQL that must use BETWEEN. To get all tours I use:        var theseTours = from pr in db.PackageRegions                         where pr.regionID == RegionID && pr.Package.isVisible==trueNow I want the LINQ to say ie. that...
Source : MSDN Forums: LINQ Project General   20 hours ago

03 Dec
11 : 07
LINQ to SQL with multiple StartsWith
I have some LINQ to SQL that must use StartsWith. To get all tours I use:        var theseTours = from pr in db.PackageRegions                         where pr.regionID == RegionID && pr.Package.isVisible==trueNow I want the LINQ to say ie. that...
Source : MSDN Forums: LINQ Project General   21 hours ago

03 Dec
06 : 48
How to simultaneously implement LINQ paging with LINQ caching?
    Hello, I have created an example project that uses 2 tables from NORTHWND database. In this project I want to implement LINQ caching together with LINQ paging functionality. Currently I am only capable of implementing these two functionalities separately. If the caching works then paging no...
Source : MSDN Forums: LINQ Project General   26 hours ago

03 Dec
05 : 01
Specified cast not valid when using .Contains
  As a newcomer to LINQ I am greatly intrigued by the possibilities, although still learning the dynamics.   I have 2 queries written in LINQ: DataClassesDataContext dc = new DataClassesDataContext(); var debts = from rec in dc.OurRecords join xd in dc.ExcelDatas on new { rec.AccountNumber,...
Source : MSDN Forums: LINQ Project General   28 hours ago

02 Dec
09 : 50
Load treeview using Linq to SQL
  How can I load treeview using LINQ to SQL. I have searched in google, but I couldn't find anything related to it.   Currently I am using ds.relations to load the treeview.  I want to display Parent Column,Child Column for treenode.   How can I do this? Someone Plz help me. Hope I would get...
Source : MSDN Forums: LINQ Project General   47 hours ago

02 Dec
07 : 46
Cannot write the LINQ aggegrate expression group + first
The query here, is getting the first verse of each chapter from a bookin in a bible.   SELECT First(Text.textid) AS FirstOftextid, First(bookchapter.chapter) AS FirstOfchapterFROM bookchapter INNER JOIN bookchapteralinea INNER JOIN [Text] ON bookchapteralinea.bookchapteralineaid =...
Source : MSDN Forums: LINQ Project General  

02 Dec
05 : 29
Create a XML / extension problem
I need to write a xml based on a template: contact:info xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:contact-1.0contact-1.0.xsd"> contact:id>e654321contact:id> contact:info>How can I create these kind of xml (in red)?I can create...
Source : MSDN Forums: LINQ Project General  

02 Dec
04 : 23
Problem with Linq Query
I would appreciate some help on a query I am working on.I have a database such as the following:AppleBananaStrawberryPeachI would like to be able to allow the user to filter these items by starting alphabetical character.For example, I would like them to be able to select one of the...
Source : MSDN Forums: LINQ Project General  

02 Dec
03 : 37
Create a XML / Problem with XSI
I need to create several xml files based on existing template.This is the xml that I'm having trouble with:xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="ur n:ietf:params:xml:ns:model.xsd">With the "xmlns:xsi" I've sucessful used the bellow code:XAttribute(XNamespace.Xmlns...
Source : MSDN Forums: LINQ Project General  

02 Dec
03 : 20
Quering generic.list rows to get Car Name after "Car Name="..and until...
1      Dim moveableLabel As MovableLabel2            Dim i As Integer = 13            Dim ItemNumber As Integer = 04            For ItemRow As Integer = 1 To DList.Count5                If DList.Item(ItemNumber).Contains("Car Name=")...
Source : MSDN Forums: LINQ Project General  

01 Dec
12 : 31
Linq to Sql: same query generated, but two time-out
Hello, I'm using L2S for a data access layer for a web page: all it does is select records that match a search keyword and display the results in a gridview.   Linq generates the same query for three string variations: StartsWith, EndsWith, and Contains, but the query for EndsWith and Contains...
Source : MSDN Forums: LINQ Project General  

01 Dec
11 : 06
LINQ To XML Help required
Hi, I'm just going to put this problem out there and hope someone cna help. I am trying to shred the following document using LINQ To XML (those ******** smileys don't help. grrr. The tongue-tied smiley is actually a colon followed by an 's', the big smile smiley is a colon followed by a 'd')  ...
Source : MSDN Forums: LINQ Project General  

01 Dec
03 : 48
Need Help with creating an XPath parser in Linq (using Infix-PostFix and...
  Silverlight lacks XPath support in LinqToXML.  I need to be able to do dynamic queries over xml for a medical application, where the queries themselves are stored in XML.  An example of this type of query is a rule for when a certain test (in this casea pap smear) is needed:...
Source : MSDN Forums: LINQ Project General  

01 Dec
03 : 01
Use an array to query attribute values
LINQ to XMLHi,I'm trying to find "UD" and "OL" elements in this xml structure:Username="UD" />Username="OL" />Username="SD" />...because UD and OL have to be parameters, I would like to put them into an array:string[] Usernames = new String[2];Usernames[0] = "UD";Usernames[1] = "OL";I can do this...
Source : MSDN Forums: LINQ Project General  

29 Nov
12 : 36
How to join two tables with LINQ inner join in a class file?
Hello,   I need a solution on how to INNER JOIN two tables with LINQ in a class file which I can utilize from an ObjectDataSource control. I want to do development in object oriented fashion. Currently I only know how to use LINQ to pull data from single tables such as in the example below:   ...
Source : MSDN Forums: LINQ Project General  

29 Nov
04 : 09
Combining two IEnumerable-s with parallel traversal
I would like to write such code without foreach which calculates the following:// assume that the lists are equal lengthgivenIEnumerable a = {1,2,3};IEnumerable b = {3,4,5};I would like to getIEnumerable c = {1+3, 2+4, 3+5};by writing down something similar to this:var c = a.Combine(b, (a_i, b_i) =>...
Source : MSDN Forums: LINQ Project General  

29 Nov
02 : 49
vb.net Anonymous Types and Object Initialization PROBLEMS with SYTAX.. I...
Hi there,   I have a problem with my syntax I think... actually its probably more but I am too inexperienced to know it.   I can obtain a result with the following:   Code Snippet Dim TEST2 = From client In db.clients _ Select client.client_no, _ accountType = client.type, _ Name =...
Source : MSDN Forums: LINQ Project General  

28 Nov
12 : 14
LINQ; how to create a transient class that represents a limited set of...
Hello,   How do I create a transient class that represents a limited set of database columns when performing a particular query? I am using LINQ with VB.   Currently I only know how to represent columns from a single database table:   Partial Public Class Class1   Public Shared Function...
Source : MSDN Forums: LINQ Project General  

28 Nov
05 : 15
Drill into generic ExecuteQuery to resolve invalid cast exception
Hi all,I use:IList resultList = DataContext.ExecuteQuery(query.ToString()).ToList();But unfotunately this statement throws an illegal cast exception with certian DTOs. The propertyname match exactly the column names of the result set so it must have something to do with the datatypes.I want to use...
Source : MSDN Forums: LINQ Project General  

27 Nov
08 : 17
A little help with linq to xml
Hello   So i have this xml   Code Snippet xml version="1.0" encoding="iso-8859-1"?> model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> year id="2008"> scenario id="Standard"> section id="FR" name="Folha de Rosto"> page id="P1"> group id="G1"> field id="FRP1G1C1"> name...
Source : MSDN Forums: LINQ Project General  

27 Nov
05 : 12
Parent / Child tree relationship in Linq to SQL
  Hi ,   I wonder if there is someone can help me in this,    I have  a table called ControlInfo where I store controls rendered in my application from  database with the following structure :   ControlID                       Text                  ...
Source : MSDN Forums: LINQ Project General  

27 Nov
03 : 22
Weird Behavior with LINQ to XML
I have some LINQ to XML code which is not behaving the way I would like it to, and as far as I can tell I am not doing anything wrong so hopefully someone here can spot the error of my ways...   The block of XML I am trying to parse is as follows Code Snippet DBInfo TableName="organization"...
Source : MSDN Forums: LINQ Project General  

27 Nov
02 : 09
Linq Performance
  Hi,   I have a problem, when using linq,  timeout error. I think its occurs because table has many rows.    I using this way:   Code Snippet Public Function CarregarMotivos() As VOLKM.Retorno Dim listaMotivo As IList Try listaMotivo = db.Motivos.Where(Function(obj) obj.IndExcluido =...
Source : MSDN Forums: LINQ Project General  

26 Nov
02 : 56
LINQ MAX & Math.Max - problem with doubles
Hi Guys,   I've recently discovered that .Max(...) and Math.Max(...) operate slightly differently when dealing with doubles.   Code Snippet Console.WriteLine("Linq max: " + new double[] { 20, double.NaN }.Max()); Console.WriteLine("Linq min: " + new double[] { 20, double.NaN }.Min());...
Source : MSDN Forums: LINQ Project General  

25 Nov
07 : 05
Many to One question
  Just curious on different point of views to accomplish the following. I am learning LINQ and LINQtoSQL while working on a small proof of concept application and trying to figure out the best way to model something.   Say you have a couple of tables like Customer and Supplier with a bunch of...
Source : MSDN Forums: LINQ Project General  

25 Nov
03 : 36
Canceling an insert and/or delete with linqToSql
 Hi all,I have a problem using LinqToSql to cancel an insert i've made to a table of my db.Ok let's say my db has the following structure:Contact Table and Contact_Office Table (that contains work related informations)So one Contact could have multiple Contact_Office information.I'm trying to had...
Source : MSDN Forums: LINQ Project General  

24 Nov
13 : 26
LINQPad Autocompletion has arrived!
Autocompletion for LINQPad is finally a reality! (Albeit for a small fee).   My sincere thanks to all the beta testers - as well as those who have waited patiently all these months. (Incorporating autocompletion turned into a non-trivial integration project!)   Download from here: ...
Source : MSDN Forums: LINQ Project General  

24 Nov
11 : 50
Automatically filtering a table's results
I've built a data access layer based on LINQ-To-SQL, where each class (obviously) maps to a table in the database. Some of these classes conform to an Interface ISecurable. These are records in the database that are controlled be a separate security system. I can easily tell whether a user has...
Source : MSDN Forums: LINQ Project General  

24 Nov
08 : 03
LINQ to SQL Connection Strings
When creating a LINQ to SQL class (a dbml file), and using the Server Explorer to grab your tables/stored procedure, Visual Studio will usally create a new connection string if it doesnt match a string already in your web.config and you get this warning:   The objects you are adding to the designer...
Source : MSDN Forums: LINQ Project General  

24 Nov
06 : 40
I need a service which has both NetTcpbinding and HttpBinding.. Can you...
Hi all,                I need a service which has both NetTcpbinding and HttpBinding.. (Eg) For silverlight application i need to call the HttpService and for WPF application i need to call the netTcpBinding(But the Service should be same where as the Calling method should be...
Source : MSDN Forums: LINQ Project General  

23 Nov
07 : 18
Linq to objects - query optimization
I have a linq query with an orderby. I'm expecting linq to optimize the code, so the orderby descending and the a call to First() are optimized against each other to form a Max operation, which is algorithmically is a linear time operation, not a log(N) like orderby on it's own.Is my expectation...
Source : MSDN Forums: LINQ Project General  

23 Nov
02 : 32
Can't get a table from Linq and stored procedure
I'm going nuts trying to get this to work and I've distilled it down to the simplest possible example.   I want to execute a stored procedure (SQL Server 2005) and return rows from a table. I've added the Linq-to-SQL classes and dragged the table and stored procedure onto the work surface. My...
Source : MSDN Forums: LINQ Project General  

22 Nov
03 : 45
Dictionary<> LINQ to SQL
Hello All,I am fairly new to programing and just have, what I hope, is a simple question.  I have a program that parses data and puts it in a Dictionary, I was wondering how I would go about using LINQ to SQL to put this data into a database?  I am able to use LINQ to run different queries against...
Source : MSDN Forums: LINQ Project General  

21 Nov
13 : 38
Linq-to-ojects and a custom collection
  Hey :)   What is the best way to execute linq queries aganst an object implementing the following methods only:   public virtual System.Collections.IEnumerator GetEnumerator() public virtual object this[int Index] { get; } public virtual int Count { get; }   Is there a better solution, than...
Source : MSDN Forums: LINQ Project General  

21 Nov
08 : 19
Retrieving 1:m relational data using LINQ to SQL
  Hi,   I m new to Linq - SQL. I just want to retrieve 1:m relational data using linq to sql using strored proc.   In my scenario, I have two tables "PetLovers" and "Pets". For each pet lover there can be multiple pets. The primary key of "PetLovers" is a forign key for "Pets".   I used the O/R...
Source : MSDN Forums: LINQ Project General  

20 Nov
07 : 13
LINQ Select Distinct to Dropdownlist
I have the following code:   Dim dc = New DataClassesDataContext Dim q = From s In dc.MyTable _ Select s.Field _ Distinct ddlList.DataSource = q ddlList.DataBind()   I have called the code above from the page load event and the ddlList_load event.  I notice that it runs the code initially on load...
Source : MSDN Forums: LINQ Project General  

19 Nov
05 : 26
Any Element Value Equals...
I have an XML file that is being created dynamically from multiple sources... The XML file looks much like many of the Microsoft examples (i.e. as seen below). In actuality, there are multiple XML files, each file will be consistent always having "X" number of child elements, but each file may have...
Source : MSDN Forums: LINQ Project General  

19 Nov
02 : 55
How i can make this generic query pattern work?
How i can define the func to use this query in a generic form?     IQueryable ApplyFunkyQuery(  IQueryable source,  Expression> filter1,  Expression> filter2,  Expression> projection1){  return    source      .Where(filter1)      .Select(projection1)      .Where(filter2);}...
Source : MSDN Forums: LINQ Project General  

18 Nov
11 : 26
Implementing IQueryable provider: How to handle different data source type...
We are about to implementing IQuaeryable provider for some data source. Linq to SQL, for example translates query to SQL. The question is how to handle a case in the implementaion where different data source type for example SQL-based and not SQL based are present in the same query (for example in a...
Source : MSDN Forums: LINQ Project General  

18 Nov
04 : 59
linq isn't putting single quotes around string value
I am getting a query from linq that isn't surrounding the string value in this call with single quotes.  Anyone know what would cause this?  I've verified that boht the parameter and the property AffiliateSiteId are both strings so I'm not sure what else to check.  Thanks.   public...
Source : MSDN Forums: LINQ Project General  

18 Nov
02 : 15
Subquerie em Array dentro de um List
Pessoal,Tenho um array dentro de um list e gostaria de fazer uma subquery para fazer um select com parâmetros específicos. Recebo uma lista de processos, sendo que na minha classe de Processo contém um array de Itens de Processo (outra classe...que contém atributos específicos)Segue o contexto...
Source : MSDN Forums: LINQ Project General  

17 Nov
08 : 36
Sorting LINQ (Datetime from List)
  I was helped to use LINQ in this threadhttp://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/cbeca5a f-9268-462a-942b-9fa051c8c745And now I need some more help applying LINQ to this sort!  XmlDocument xDoc = new XmlDocument();               string xml = @"...
Source : MSDN Forums: LINQ Project General  

17 Nov
02 : 50
Aggregation using Group by in LINQ
Hi,I am trying to run a linq query on a collection and I want the result to contain all the columns in the collection. But those columns that are not unique across a single rows' aggregation should have the value as null. How can i do this? Is there any expression available using which I can return...
Source : MSDN Forums: LINQ Project General  

15 Nov
11 : 00
Linq wrapper class
Hi,I have a wrapper class for Linq results that generally looks like this:Code Snippetpublic class DataSource{ public int Count { get; set; } public IEnumerable Data { get; set; }} Count is the number of Linq results before filtering, so DataSource.Count != DataSource.Data.Count() My problem...
Source : MSDN Forums: LINQ Project General  

15 Nov
07 : 07
Linq to SQL OrderBy() with reflection
Is it possible to write a method that when passed an IQueryable and a string for a propertyname (as in Wpf binding scenarios) will return the queryable as an OrderBy() for that property? It has to work in querying a database, too.Here's my example that doesn't work:public IQueryable (IQueryable...
Source : MSDN Forums: LINQ Project General  

14 Nov
07 : 03
Autocompletion for LINQPad - beta testers wanted
Autocompletion for LINQPad is now in beta and I need 20 more beta testers.   If you use LINQPad on a daily basis and would like to give feedback, please contact me at http://www.linqpad.net/feedback.aspx with your full name and e-mail address, by November 18.   Note that the timeline is...
Source : MSDN Forums: LINQ Project General  

13 Nov
07 : 13
Apostrophe
I am working on a proof of concept for a project we would like to use LINQ to SQL with, however upon further inspection I am finding that apostrophes are killing the submit changes command.  I am aware as so why it is happening, as LINQ is creating parameters for the insert/update statement with...
Source : MSDN Forums: LINQ Project General  

12 Nov
08 : 52
How can I update a primary key and avoid Invalid Operation
  In my application there is a requirement to update the primary key of an object.  Every time I try to do this I receive an Invalid Operation message saying to create a new object and link all of the depended objects to this new object and then delete the old object.   All of my objects have...
Source : MSDN Forums: LINQ Project General  

12 Nov
02 : 54
Convert SQL to LINQ.
Hi,I'm don't know linq at all. Very few things and I need to convert a SQL query to equivallent LINQ. So please proved me with that. My SQL query is.select fpl.PositionTop, fpl.PositionLeft, fpl.SizeWidth, fpl.SizeHeight, i.issue_Id, oi.pageno,     oi.Advertiser, cpydtl.[FileName],    ...
Source : MSDN Forums: LINQ Project General  

11 Nov
02 : 24
LINQ newbie needs help with lambdas
Hi, I'm a newbie so go easy OK :)   I've got the following code which works fine: Code Snippet var contacts = obj.Contacts.Select(e => e); foreach (var contact in contacts)   {   foreach (var tag in contact.Resource.Tags)   {     Console.WriteLine(" id={0}, name={1}", tag.Id, tag.Name);  ...
Source : MSDN Forums: LINQ Project General