Dim re As New Regex("((?<field>[^"",\r\n]+)|""(?<field>([^""]|"""")+)"")((?<rowbreak>,\r\n|\r\n|\n|$)|,)")
3700,Collin,Franc,,[email protected],Collins,Francine,,[email protected],"Enel North America, Inc.",One T Drive,Suite 220,MyCity,MA,77774,1,[email protected],,,,,3700,
3701,Steur,Larry,,[email protected],Steur,Larry,,[email protected],...
We have been developing a DB web app which constantly queries an SQL store of objects (about 80,000 of them) which are related to each other in a hierarchy. (i.e. many objects have parentid which relates to another object in the same table)
I have been thinking that loading the entire object tree into memory and querying the objects usi...
I'm puzzled. I copied this code from the Microsoft LINQ examples site, but can't get it to compile.
I want to do something similar, but it says it cannot resolve symbol minPrice, and a bunch of other errors. What gives?
public void Linq84() {
List products = GetProductList();
var categories =
from p in products
g...
I am trying to implement an interface class, that contains a list of objects. How can I make the list generic, so that the implementing class defines the type of list:
public interface IEntity
{
Guid EntityID { get; set; }
Guid ParentEntityID{ get; set; }
Guid RoleId { get; set; }
void SetFromEntity();
void Save();
...
Hi folks,
i have a table that has zero to many children. just like how this site has a QUESTION which can have zero to many VOTES (either Up == 1 or Down == 0).
I need to get all questions that have the most up votes. Eg. all the questions, ordered by Sum(Vote) descending.
I'm not sure how to do it in linq.
So i would have an EntityS...
I am starting to explore LINQ to Objects but want to know how application design can best accommodate LINQ to Objects.
As an example .... an application displays female employees only and the employee table in the database contains data for both male and female employees.
By default, the application builds a SQL statement to retrieve ...
Possible Duplicate:
IList<T> to IQueryable<T>
I have a List data, but I want a IQueryable data , is it possible from List data to IQueryable data?
Show me code
...
I have been looking at the examples for updating models in the MVC architecture. There are plenty updating the model where the linq (SQL or EF) is in the controller. And there are others where the service layer is used to fetch values. The only example I can find its going to be awkward to use with an IoC container.
What I'm looking to ...
I was able to set up a WPF Datagrid, display a Northwind database table via linq-to-sql, and handle the TheDataGrid_RowEditEnding event so that it saves back the the database.
However, when a CustomerID was changed, it gets an error from the database which I handle, but how do I now either (1) rollback the Datagrid control or (2) refetc...
Given that they generate the Create, Read, Update, and Delete (CRUD) functionality for you in most cases, does this imply that stored procedures won’t be used as often? If these methods use LINQ then that means no stored procedures are used, correct?
Any clarification is greatly appreciated.
...
I have successfully set up a WPF Datagrid with the March 2009 WPF Toolkit, created LINQ-to-SQL classes from the Northwind database, bound the WPF grid with this code:
var customers = from c in _db.Customers
select c;
TheDataGrid.ItemsSource = customers;
I can move columns from left to right, got delete columns to work...
I'm trying to create a logger that will write the queries LINQ executes to the page formatted with the great javascript library SyntaxHighlighter.
For that, I've set the DataContext's Log property to my custom logger, which is working well.
Now I just need to get the current Controller object (outside the controller execution context) ...
I’m looking for a tool that will dynamically generate Linq to Entity queries from a given entity, a Query By Entity (Example), if you will. Given an entity and the object context it belongs to, the generator returns an ObectQuery or IQueryable that could be further modified or executed. Ideally, the query builder would not directly ref...
given
1. the initial idea, link text and
2. creating nested loops link text
can I use linq here or how should I massage this to authenticate WindowsPrincipal to sql table? Thanks, -greg
protected void Page_Load(object sender, EventArgs e)
{
string UserIdentityName = Server.HtmlEncode(User.Identity.Name);
Boolean Match ...
Hey all, Ive been tasked to upgrade our existing extranet from .net 2.0 to 3.5.
One of the main issues i had during the build phase for the 2.0v was the data was coming from SQL server 2005 and a legacy db in Sybase 9. To achieve this i basically made to Dataset's accordingly based on SPROCS and a third DS to merge. This then would...
Hi, is it possible to make a join in linq and only return data from one dataset where the other key was present, a little like:
var q = from c in customers
join o in orders on c.Key equals o.Key
select new {c.Name, o.OrderNumber};
and then instead of returning just the two records then returning customers like...
Here's a simple problem. I have an application that takes a phone number like "13335557777", and needs to reverse it and insert a dot between each number, like this:
"7.7.7.7.5.5.5.3.3.3.1."
I know I can do this with a StringBuilder and a for-loop to reverse the string and insert the dots, but is there a clever way to do this in LINQ ...
I'm new to LINQ and want to know how to execute multiple where clause. This is what I want to achieve: return records by filtering out certain user names. I tried the code below but not working as expected.
DataTable tempData = (DataTable)grdUsageRecords.DataSource;
var query = from r in tempData.AsEnumerable()
where ((r.Fie...
In LINQ, I'd like to project different names than those from the database tables. "Friendly names" that I can use for column headers. Names that have "%" or possibly a " " (space). The query below won't compile.
Is something like that possible or am I stuck using the dreaded _ underscore for everything?
dim query = from p in ctx.Som...
I have two tables 'toc' and 'content' with the following structure:
toc
id
name(50)
content
id
text(500)
title(50)
tocid
I am searching the for some text within toc.name, content.text and content.title and require a single resultset.
Is it possible to combine the search results using linq(c#). I want the resultset as something like...