Linq-to-sql Questions
Ad
Linq to SQL: Asking if a date is empty
I've got a new instance of an object in a linq dbml, but don't know of the test if the a date field is empty. i have tried:
Good sophisticated linq to sql sample?
I am looking for a more sophisticated way of using linq to sql. i am leaning l2q but i am only seeing simple examples of business objects and
Limiting results of System.Data.Linq.Table<T>
I am trying to inherit from my generated datacontext in linqtosql - something like this public class mycontext : dbdatacontext {
How does SQL know what @p# in LINQtoSQL queries?
I want to know how does the sql server know what @p# is in say this linqtosql query select [t0].[memberid],
What to do about @p LINQtoSQL parameters? What is @p anyhow?
Okay still fighting with doing some sqlcachedependecy in my asp.net mvc application i got this piece of code from microsoft to cache
LinqtoSQL filter and order by syntax
My techie bretheren (and sisteren, of course!), i have a linqtosql data model that has the following entities:
Is there a pattern using Linq to dynamically create a filter?
Is there a pattern using linq to dynamically create a filter? i have the need to create custom filtering on a list, in the past i would
Linq To SQL: Can I eager load only one field in a joined table?
I have one table "orders" with a foreing key "productid". i want to show the orders in a grid with the product name,
How much database performance overhead when using LINQ?
How much database performance overhead is involved with using c# and linq compared to custom optimized queries loaded with mostly low-level c,
How to handle programmatic addition of fields?
Yesterday, i asked this question regarding best
Ad
How do I not return {ModuleName = Admin} from the linq query?
I am trying to get the string value "admin" from a linq query, but when i do: string oldmodule = dc.modules
Reading data from database in Linq-to-SQL
I have this class: public class student1 { public string name { set; get; } public string number { set;
How can I speed up this Linq to SQL query?
So, i have a function that returns data for use in a gridview. it takes ages to complete (about 25 seconds). i think i've written it very badly
How can I refactor this EF Core query to add another where condition variable?
I have this query below that looks for a transfer with a user id in either the senderid or receiverid column. //
LINQ to SQL Association - "Properties do not have matching types"
I am trying to link two fields of a given table to the same field in another table. i have done this before so i can't work out what is wrong this
ValidationAttribute Redux
Ref to:creating a validationattribute
Building dynamic where query from linq to ef core
My model looks like below public class country { public int id {get; set;} public string name {get; set;} } public class user
ASP.NET Convert Invalid String to Null
In my application i have textbox in a formview bound to a linqdatasource like so:
Localisation/I18n of database data in LINQ to SQL
I have status tables in my database, and "localised" tables that contain language-specific versions of those statuses. the point of the main
How to insert depending LINQ to SQL entities without manual ID update in C#?
I have 2 models. model foo [system.data.linq.mapping.table(name = ...)] public class foo {
How to recover from System.Data.Linq.DuplicateKeyException without disposing DataContext?
By design i'm expecting a duplicatekeyexeception from time to time. is it possible to recover from such situation without recreating the
Ad
Will using a transaction eliminate the need to use secondary dataContexts to attempt sql insert/update/deletes?
So i have a list of it/developer tickets stored in a database via linq-to-sql. save attempts are only done at the user request, or if they say
LINQ to SQL INSERT Failing
I am experiencing a very frustrating issue when trying to insert a new record using linq to sql. if i step through this code sometimes it inserts
Mimicking SQL Insert Trigger with LINQ-to-SQL
Using linq-to-sql, i would like to automatically create child records when inserting the parent entity. basically, mimicking how an sql insert
Non-Generated Property in LINQ to SQL insert behavior
Is it possible to force the linq to sql designer behavior editor to recognize properties on table entities that have not been generated by the
linq to sql insert query not working from unit test project
I'm having a strange behavior in linq to sql... i have a simple parent | child (one to many) object model. in my app, i create the parent
linq to sql Insert not working on deployed server(IIS)
Title speaks for itself, db.executecommand("insert into tcsvfile(filename, filecontent, mimetype, timecreated) values({0}, {1},
LINQ to SQL: Insert non-identity Primary Key
I am using linq to sql for the first time on a small project. my tables have primary keys that are not identity columns because i am essentially
LINQ to SQL insert-if-non-existent
I'd like to know if there's an easier way to insert a record if it doesn't already exist in a table. i'm still trying to build my linq to sql
What is the correct way of reading single line of data by using Linq to SQL?
I'm very new to linq, i can find multi-line data reading examples everywhere (by using foreach()), but what is the correct way of reading a single
Converting SQL to LINQ query when I cannot use "IN"
I'm trying to convert this very simple piece of sql to linq: select * from projects p inner join documents d on p.projectid =
What is the fastest way to determine if a row exists using Linq to SQL?
I am not interested in the contents of a row, i just want to know if a row exists. the name column is a primary key, so there will
Ad
What causes Visual Studio to fail to load an assembly incorrectly?
I had been happily coding along on a decent sized solution (just over 13k loc, 5 projects) which utilizes linq to sql for it's data access. all of
Refreshing a DBML diagram?
Really stupid question, sorry, but i can't find it on google (i'm sure it's in a screencast or something somewhere). i have a dbml (linq2sql
Problem refreshing tables in the LINQ to SQL designer
I have been using linq to sql for a while, and there is one thing that has always bothered me. whenever i modify the schema of a table, in order
Refreshing LinQ2SQL Model in Designer without losing all Properties
So i'm using linq2sql quite heavily in my current application, and although i have most stuff in partial classes, some things have to be adjusted
Are Multiple DataContext classes ever appropriate?
In order to fully use linqtosql in an asp.net 3.5 application, it is necessary to create
Ad
Blog Categories
Ad