• RELEVANCY SCORE 4.06

    DB:4.06:Unable To Drag Table Objects In The Linq Designer jj




    I am using sql server 2008 (Enterprise Edition ) along with vs2010. I come across the error ''The selected object(s) use an unsupported data provider when I try to drag a table from the server explorer to the linq designer. What is the solution.

    DB:4.06:Unable To Drag Table Objects In The Linq Designer jj

    Hi Venkatesh,
    Welcome to MSDN Forum!
    SQL Provider is supported by Linq to SQL, please double check the provider you select.
    Best RegardsAllen Li [MSFT]
    MSDN Community Support | Feedback to us

  • RELEVANCY SCORE 3.09

    DB:3.09:Linq To Sql Classes, Table Classes Not Created p3




    Hello everyone.
    I'm trying to import a database and tables to my project via linq to sql class. I can successfully create a sql connection and drag the table into the database designer but no table class definitions are created automatically. Thus, I'm unable to access
    the table properties via linq.
    I have done this in the past but I don't remember how. I'm running Win7 x64 and VS2008 Pro SP1.
    Any ideas, anyone?
    Thanks!

    DB:3.09:Linq To Sql Classes, Table Classes Not Created p3

    Hi,

    I am writing to check the status of the issue on your side.
    Would you mind letting us how is the problem now?

    If you need further assistance, please feel free to let me know.
    I will be more than happy to be of assistance.

    Have a nice day!

    Best Regards,
    Lingzhi Sun
    MSDN Subscriber Support
    in Forum
    If you have any feedback on our support, please contact
    msdnmg@microsoft.comPlease remember to mark the replies as answers if they help and unmark them if they provide no help.

    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

  • RELEVANCY SCORE 3.03

    DB:3.03:Unable To Insert Using Linq j1




    I am trying to insert a row into a table using LINQ to SQL (VS08, .NET 3.5 using VB), but I'm not having any luck. All the examples I've seen are pretty straightforward and go something like this:
     

    Code Block

    DB:3.03:Unable To Insert Using Linq j1

    Hi,
     
    If you are using VS2008 RTM then Add has been renamed to InsertOnSubmit.
     
    For more information, see this post:
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2060651SiteID=1
     
    Hope this helps.
     
    Ben

  • RELEVANCY SCORE 2.96

    DB:2.96:Transfering Data From One Table To Another Using Linq pc


    Hi there
     
    I am new to linq but I like to write type safe code and having intellisense
     
    Currently I have to transfer some records from one table to another. With the old sql style I can do it with a command like
     
    Insert into printeditems (item, amount, info) select item, amount, infro from items
     
    But how can I write this statement with linq without looping through all records/linq objects?? Because I have to transfer a couple of thousands of records I takes me about one minute with looping with linq and only some milliseconds with the old sql statement.....
     
    Has anyone an idea on how to solve this problem??
     
    kind regards
     

    DB:2.96:Transfering Data From One Table To Another Using Linq pc

    Linq-to-SQL don't support SQL-DML (batch operations) out-of-the box. You can however write extensions that take advantage of the L2S plumbing to generate SQL-DML/batch sql statements.
     
    I have posted two code examples in my blog that uses L2S to generate set-based update and delete statements. insert into ... select ... is not part of those samples but can easily be added using the sample code as a base. See:
     
    http://blog.huagati.com/res/index.php/2008/11/05/architecture-linq-to-sql-and-set-based-operations-update-statements/
    http://blog.huagati.com/res/index.php/2008/11/25/architecture-linq-to-sql-and-set-based-operations-delete-statements/
     
    ---
     
    Alternatively, if it is a one-off thing it is probably easier to just use the .ExecuteCommand method on the datacontext to run a plain old SQL-in-string statement.

  • RELEVANCY SCORE 2.82

    DB:2.82:Linq To Crystal Mapping pz


    I've objects generated by LINQ mapping framework...when I am using these object with CrystalReport...its asking for login info and never accept it....any IDEA ?????

    DB:2.82:Linq To Crystal Mapping pz

    I've objects generated by LINQ mapping framework...when I am using these object with CrystalReport...its asking for login info and never accept it....any IDEA ?????

  • RELEVANCY SCORE 2.77

    DB:2.77:Visualizer For Linq Objects a7


    Hello,
    I am very impresed from LINQ framework.
    I am mostly work with LINQ over data structures and LINQ over DataSet which I found very very useful.
    The problem is I have no debug visualizer for watch the result expression tree.
     
    Thank you,
    Ido.

    DB:2.77:Visualizer For Linq Objects a7

    Dear Terry,
    Don't be sorry :)
    You are completly right. I am talking about visualizing the resulting expressing tree. Only that I want to visualize the resulting expressing tree of a Linq over DataSet expression and not expression of DLinq (Linq over Database).
    Thank you very much,
    Ido.

  • RELEVANCY SCORE 2.69

    DB:2.69:Linq To Sql Designer Error xx


    HeyI am developing some LINQ code to use alongside an existing database so thought I would use the designer to drag and drop tables.However when I attempt to drop a table from Server Explorer onto the LINQ to SQL Designer I get a message box with the following error:Element not found. (Exception HRESULT: 0x8002802BTYPE_E_ELEMENTNOTFOUND).If I close down the project and reopen it I get the same exception but the error occurs when processing the local data file.I am using Visual Studio 2008 professional, .NET 3.5 and running Vista Home Premium.Has any one else had this error and if so how did you solve it?Thanks

    DB:2.69:Linq To Sql Designer Error xx

    Hi
     
    Thanks for your reply, this is what I was doing and it wasnt working.  I solved it by reinstalling Visual Studio
    and now all is working as it should.
     
    Thanks
     
    Dan
     

  • RELEVANCY SCORE 2.67

    DB:2.67:Datagridview jm


     
    Is it possible to show more than one table in a Datagridview.  Here is my problem.  I have a datagridview and two buttons.  i would like depending on which button is pushed to determine which table is displayed in the datagridview box.  I have used the LINQ to SQL to creat the objects but I cant figure out how to used both tables as a datasource for the datagridbox.
     
    Thanks,
     
    Bryan

    DB:2.67:Datagridview jm

    Whoops, sorry bout that, forget the databind().Btw, MyTable1 is just a random name I choose, you should fill in whatever object represents your first table (resp second table) here.The improbable we do, the impossible just takes a little longer. - Steven Parker

  • RELEVANCY SCORE 2.67

    DB:2.67:Linq To Entities Design Question dc


    Hello everyone,I would like to bring up more of a design question in regards with Linq to Entities. First of all, I am not super knowledgeable about Linq to entities (LE), but I have seen demos and some basics behind how it works.The term ORM has been thrown around and fair enough it does map objects to a relational system, however, I have noticed that the classes that get generated via LE, are just simple classes that encapsulate the properties of a DB table. This brings up my question. What real benefit do I get if I move from strongly typed datasets, to LE? I know the nice Linq queries are good, and thats nice, but I feel like this really blurs the line between the data access layer and the business layer of the application. Typically I have local business logic within my business classes, like the Customer class (as a typical example). All I really see as a benefit of moving to LE (or even Linq to SQL I guess), is the ability to have the select statement from within the actual code, ie Linq queries.I would really appreciate someone with some knowledge about Linq to Entities (or Linq to SQL) to comment on this question, all replies are appreciated.Thanks!Mark

    DB:2.67:Linq To Entities Design Question dc

    Absolutely -- anything can be misused.  You could even put your LINQ to SQL code in your Windows Forms or WPF code-behind.  But, IMO, that's not the way to go.
     
    -Larry
     
     

  • RELEVANCY SCORE 2.65

    DB:2.65:Linq O/R Designer Schema Mismatch When Adding A Stored Procedure da


    I'm running Visual Studio 2008 9.0.21022.8 RTM, with SQL 2005.
     
    I've been working on a project that uses Linq, and up until today, everything had been working great.  I started to get data cast errors when reading the results from a basic from .. select clause.  It looked like the error had to do with a mismatch between the column data type in the DB and what was shown in the O/R designer.  However, after changing the data types in the designer to match the DB, the problem didn't go away.
     
    I decided to delete the table I was working on from the O/R designer, along with all of the attached SPs, to get a fresh start.  I was able to add the table back, but now I'm seeing a strange problem with the SPs.  When I drag one onto corresponding table, the designer complains that one or more selected database objects return a schema that does not match the schema of the target data class.  I tried modifying the SP to return select * from [Table], and the designer still complains.
     
    The odd thing is that this worked fine earlier.  I'm sure I made several changes to the schema along the way, and I apparently broke something in the process.  One change was to add a parent/child self-referential foreign key, although when I removed it from the designer, it didn't help.  The error messages are not very helpful.  Any ideas on what might be wrong would be appreciated.
     
    Thanks!

    DB:2.65:Linq O/R Designer Schema Mismatch When Adding A Stored Procedure da

    I had this problem and was able to solve it. This may not apply to everyone, but... I had a stored procedure calling up a view. In the view I was casting a date time field { = CONVERT(VARCHAR(8), ExpirationDate, 1)} When I removed this conversion, recreated
    the view and sp, and refreshed the server explorer, I was able to add the view and the stored procedure into the entity diagram without this error.

  • RELEVANCY SCORE 2.65

    DB:2.65:Specified Cast Is Not Valid In Linq? 31


    Hi,
    these is Database Structure
    TimeSheetId int Unchecked
    ReserveID int Unchecked
    LoginTime datetime Checked
    LogoutTime datetime Checked
    Day Checked
    Hour Unchecked

    first i bind normally , its work properlly
    but i formulate Hour Field like
    (CONVERT([nvarchar](52),[LogoutTime]-[LoginTime],(108)))
    its giving a error :

    Specified cast is not valid.]while i refresh the table from server explorer and again drag and drop itthanks

    DB:2.65:Specified Cast Is Not Valid In Linq? 31

    Hi Anurag sir,
    Please paste the definition of your model SearchUserTimeSheetModel also.
    the class details of the model SearchUserTimeSheetModel. with this we can identify why the exception is coming.

  • RELEVANCY SCORE 2.65

    DB:2.65:Linq To Sql Designer Question 97


    Hi All. My question is the follow:
    I use visual studio 2008 sp1 and sqlexpress 2008. In the server explorer i have all tables of my db, all written in a PLURAL way, for example
    (Customers, CustomersRegions,...), now When i do a drag and drop operation of any table from server explorer to linq to sql designer, this
    designer truncate the table Name and the last char(s) dissapear. so intead of customers after drag and drop appear Customer.
    How do I to customize linq designer to avoid this issue? I dont want the designer truncates the last char, i want to keep the original names
    of all tables. Thanks in advance

    DB:2.65:Linq To Sql Designer Question 97

    Glad to be of service, if a post solved your problem you should mark it as the answer, if a post was helpful toward it you should mark it as helpful.
    It is courtesy and will help others that may encounter the same problem find the solution quicker.
    Remember, we do this because of the simple pleasure of helping others andbetteringourselves.
    Regards

  • RELEVANCY SCORE 2.65

    DB:2.65:Update Datagridview In New Form Using Linq af


    I currently have a datagridview filled with SQL objects using LINQ.

    DB:2.65:Update Datagridview In New Form Using Linq af

    Hi Thomas,
    You could either insert a new record base on anexisting form or a new form.
    I think to create a new form would be easier. Topass the values from the combobox or textbox to the new form is easy, please check this article:
    Passing Values between Forms in .NET 1.x with C# and VB.NET examples
    To do inserting based on the existing form is also not so hard actually, just store the values in the modified record you double click in some variables. But you need to restore the old row values after inserting the new record, and show the new one meanwhile.
    Please see the below articles for more information:
    Insert/Update/Delete in DataGridView using Linq in Windows Forms

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click
    HERE to participate the survey.

  • RELEVANCY SCORE 2.63

    DB:2.63:Linq ms


    I'm trying to use the .WHERE(o=o ....) And I can't seem to be able? Is this a limitation? I can't have LINQ TO OBJECTS?

    DB:2.63:Linq ms

    Also if you are using XDocument class etc. as a replacement for XmlDocument,add System.xml.linq as a reference.

  • RELEVANCY SCORE 2.62

    DB:2.62:Does Linq To Sql Box Result Sets All At Once? ds


    Hi,I havea query that is likely to return tens of thousands of records soI'd like to know how LINQ to SQL is processing the data internally. If I have a query such asvar table = from records in db.table1 select records;foreach(table1 record in table) ...Will every record get boxed as a table1 instance when the sql is executed, or does it do one record at a time as I iterate through them? I don't want to have30,000 table1 objects stored in memory. Thanks!

    DB:2.62:Does Linq To Sql Box Result Sets All At Once? ds

    Thanks Kristofer! That's a good point about the garbage collection too. Would you happen to have any references that explain the behavior you described above and other details of what goes on behind the scenes?
    Unfortunately no - I would expect that it is documented somewhere on MSDN but I haven't come across a place where it is spelt out directly. But L2S queries exposing an IEnumerable kind of implies that kind of behavior.This great article from 2007 touches the subject:http://msdn.microsoft.com/en-us/library/bb425822.aspxThe easiest way to demonstrate/confirm the behavior I described above is to watch SQL Server with a profiler session while debug-stepping through an enumeration of a query. If you run a small query that return a small amount of data/records, you'll see that SQL:BatchStarting and SQL:BatchCompleted both take place immediately when you start the enumerating. For larger results, you'll notice SQL:BatchStarting when you start the enumeration, but SQL:BatchCompleted will occur when you're getting close to the end of the enumeration. (Although it will almost always happen _before_ you hit the last record).Likewise for object materialization; if you set a breakpoint in the entity classes constructor you'll notice that that breakpoint is hit while you're enumerating instead of all-at-once. If you instead wrap your query will a .ToList or .ToArray you will instead see that breakpoint getting hit for all records before ToList or ToArray has finished executing.Kristofer - Huagati Systems Co., Ltd.Cool tools for Linq-to-SQL and Entity Framework:huagati.com/dbmltools (add-in with new features for Visual Studio 2008's L2S and EF designers)huagati.com/L2SProfiler (Query profiler for Linq-to-SQL and LLBLGen Pro)

  • RELEVANCY SCORE 2.61

    DB:2.61:Linq Query Tolist() Method Returning Some Duplicate Rows / Objects? pm


    Hi, I'm puzzled about this one, below is a linq query which I use to return a list of items from a table, but it is returning duplicates for some objects, why would this be happening? should it not simple return a flat list of records? i'm not joining etc. just want a list of the records for that table to be returned for binding to a datagrid.
    (From survey In _context.tbl_Surveys Select survey Order By survey.name).ToList()
    I.W Coetzer

    DB:2.61:Linq Query Tolist() Method Returning Some Duplicate Rows / Objects? pm

    Hi, using the MergeOption on the table which I want to return a list from worked.
    MyContext.MergeOption = MergeOption.NoTrackingI.W Coetzer

  • RELEVANCY SCORE 2.60

    DB:2.60:Refreshing A Table Structure In The Datacontext - Linq To Sql kk


    I'm use Linq to SQL to perform queries on a TBL_Customer (inside 'MyDataContext' Datacontext).i want to refresh the STRUCTURE of the table programmatically ( not the data inside the table), for example:if i add a new column to TBL_Customer through SQL Server Management Studio, i want my application to handle this change, meaning - i want this new column to be added in the TBL_Customer table in my DataContext (without me needing to open the VS project ,drag the table to the DataContext again and then compile again).datasets does that.... it updates with the new columns without recompiling the project. is there a way to refresh the dataContext structure progrmatically ? so i can perform that everytime the application runs and save the whole 'preparations' everytime i add a column...or a way to detect changes in the table when i run the program?

    DB:2.60:Refreshing A Table Structure In The Datacontext - Linq To Sql kk

    hi,
    could you give me some hints/examples how todo it with datasets ...

    best

  • RELEVANCY SCORE 2.60

    DB:2.60:Unable To Cast The Type System.Guid To Type System.Object mc


    'retrieve a list of objects from the _context
    Dim list = (From customGroup In _context.tblCustomOrgUnits _
    Where customGroup.survey_code.Equals(surveyCode) _
    Select customGroup Order By customGroup.identifier)
    Generates the following exception (and surveyCode is not null) ??? Unable to cast the type 'System.Guid' to type 'System.Object'. LINQ to Entities only supports casting Entity Data Model primitive types.I.W Coetzer

    DB:2.60:Unable To Cast The Type System.Guid To Type System.Object mc

    Fixed it, by using the Value property of the property in the where statement:
    Dim list = (From customGroup In _context.tblCustomOrgUnits _
    Where customGroup.survey_code.Value.Equals(surveyCode) _
    Select customGroup _
    Order By customGroup.identifier)

  • RELEVANCY SCORE 2.60

    DB:2.60:Linqdatasource Cannot Find Any Datacontext Objects ad


    Hello all,I am attempting some new LINQ based programming.  I have a LINQ to SQL class created and I created it by dragging the table form the server explorer directly onto the O/R designer.  Saved that, and attempted to use it in a LINQDataSource and the linqdatasource wizard cannot locate any datacontext objects when I try to configure it.  I have been following the example as posted herehttp://blogs.msdn.com/charlie/archive/2007/11/19/connect-to-a-sql-database-and-use-the-sql-designer.aspxbut rather than using northwind, I am using my own sql table which should not make any difference from what I have been able find from the hours that I have been searching the net on this problem.Any ideas would be greatly apprecieated.Cheers,Brent

    DB:2.60:Linqdatasource Cannot Find Any Datacontext Objects ad

    Hello,
    I had the same issue; however, I solved it by verifying if the System.Data.Linq is referenced in web.config or not.
    Strangely, it exsited under References of the project and compiler could compile the application successfully. However, when I wanted to view the application in browser, I received runtime error, which stated it cannot find the related assembly. So, I added
    that manually to the web.config:

    system.web
    compilation debug=true targetFramework=4.5
    assemblies
    add assembly=System.Data.Linq, Version=4.0.30319.17929, Culture=neutral, PublicKeyToken=b77a5c561934e089 /
    /assemblies
    /compilation
    httpRuntime targetFramework=4.5 /
    /system.web
    I hope it solves your issue.
    Cheers.

  • RELEVANCY SCORE 2.60

    DB:2.60:When To Use Ado And When Not To. mc


    There are many ways that we can access databases.We have linq to sql,linq to objects,linq to datasets and finally linq to ado.net.So many methods,but when is each supposed to be used??Also please highlight the main differences between all of these.

    DB:2.60:When To Use Ado And When Not To. mc

    Rohan,
    LINQ is an incredibly powerful technology but it's not always the right tool for the job. There may be times in your application where you want to change the structure of your query based on user input, whether that's using a different sort order for
    the results, completely changing the filter, or changing the type of data being returned. To help you handle those types of scenarios, ObjectQuery gives you two options for supplying query information in the form of a string. You can construct
    the entire query as a string using Entity SQL. You can also use the query builder methods to supply individual pieces of the query via methods like Where, OrderBy, Select, etc. (I think the examples here are helpful: http://msdn.microsoft.com/en-us/library/bb896238.aspx).
    Whether you're using LINQ to Entities or the ObjectQuery class directly, you're generating query results in the form of objects. If you're not really interested in the objects and want to just read the raw data out of a stream (to construct portions
    of a web page, perhaps) you can execute Entity SQL queries using the EntityClient provider. This approach works just like getting a DataReader from any other ADO.NET provider. There's a Connection class, a Command class and a DataReader class.
    (Yes, there are Parameter and Transaction classes, too.) I wouldn't recommend starting with this approach, but it is helpful for the times where getting full-blown objects back feels like unnecessary overhead.
    As you've pointed out, there are a lot of options, and I can understand how all of the options may seem confusing or even overwhelming, but there is some rhyme and reason to them all. I hope this sheds a little more light on the topic for you.David Sceppa

  • RELEVANCY SCORE 2.60

    DB:2.60:Having Problems Filling Nested Objects In A Linq Xml Query mf



    DB:2.60:Having Problems Filling Nested Objects In A Linq Xml Query mf

    This the finished query i try other variations but they didn't work...

    Address = new Address
    {
    URL = (from t in data.Descendants(Address) select (string)t.Element(URL).Value).FirstOrDefault(),
    Port = (from t in data.Descendants(Address) select Convert.ToInt32(t.Element(Port).Value)).FirstOrDefault()
    }

  • RELEVANCY SCORE 2.59

    DB:2.59:Linq To Entity - Data From Multiple Tables cz


    How can i easily grab data from a nearby table using Linq to entities?
    tblCustomer (CustomerID, CustomerName...)
    tblOrders (OrderID, OrderData, CustomerID...)
    i'd like a list of orders of a particular customer, for example
    All data has been converted to objects and there is a 1-many relation between the tables.
    Thanks alot

    DB:2.59:Linq To Entity - Data From Multiple Tables cz

    Jonathan,
    I'm guessing that the issue you are seeing is that the order records are not loaded. In other words, when you wrote your original query, you just returned customers and not orders. In version 3.5, lazy loading is not supported. You can eagerly load them with a query something like this:

    using (MyContext ctx = new MyContext())
    {
    var customers = from c in ctx.Customers.Include(Orders)
    select c;

    foreach (Customer c in customers)
    {
    foreach (Order o in c.Orders)
    {
    MessageBox.Show(c.OrderID.ToString());
    }
    }
    }

    Notice the Include. Alternatively, you could have called Load() to load the orders for each customer, but it seems that eager loading (Include) is what you want.
    Hope that helps!

  • RELEVANCY SCORE 2.59

    DB:2.59:Linq Question 71


    Hi, I want to use LinQ to save all objects in my xaml windows. What would be the code for do it?Thanks, Oscar

    DB:2.59:Linq Question 71

    Hi Racsus, Would you please elaborate your problem so that we can help you better? Best regards, Bruce ZhouPlease remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

  • RELEVANCY SCORE 2.59

    DB:2.59:Object Relational Designer Not Compatible With Sql Server 2008 Geography Data Type 1d


    Hi,
    I am trying to make a geospatial application , i have incorporated most of the UI and visual elements .
    I am having some problems though.While using LINQ to SQL when i drag my table containing GeoSpatial Data onto my Dataclasses.dbml.
    I get an error saying that one or more objects contain a datatype not supported by the designer , is there any workaround ?
    Basically i want to retrieve all the polygons stored in the Database and draw them on the map at page initialization , any help with the LINQ to SQL Query part to do this would be highly appreciated.

    DB:2.59:Object Relational Designer Not Compatible With Sql Server 2008 Geography Data Type 1d

    I am stuck again after using the stored procedure.I want to return the result of the WCF Service to the .CS file where i would have called the function.

    public listPolygon DoWork()
    {
    var db = new DataClassesDataContext();
    var result = db.GetPolygon();
    return result;
    }
    Here Polygon is my column which stores the spatial data of the polygons , VS 2010 is not showing Polygon in intellisense and i am not able to use it as it shows that polygon isnt found .How to return the data of the query to the .CS file ?
    EDIT: Now i am not even able to drag the stored procedure onto the object relational designer , it is only possible if i remove the polygon from my query

    ALTER PROCEDURE[dbo].[GetPolygons]
    AS
    SELECT Name,Polygon,Type
    FROM DrawPolygons

    RETURN
    Until i remove my Polygon from select , i cant copy it to relational designer.

  • RELEVANCY SCORE 2.59

    DB:2.59:Deleting A Bunch Of Records Without Loading Objects 1a


    In my Orders table, I want to delete all orders with creation date 2006. In old-style SQL, I would just submit the SQL Statement DELETE FROM Orders WHERE CreateDate'2006/1/1'. With LINQ, I have to load all objects to be deleted into memory first, and then use RemoveAll on the TableOrder object - unless I want to use the ExecuteSql method of the DataContext - but then I use the LINQ advantages. Is there any way to do this type of query in a linq way without actually loading the Orders objects?
     
    Thanks
    Urs
     

    DB:2.59:Deleting A Bunch Of Records Without Loading Objects 1a

    In a word, no.
     
    This is something we are considering for future releases, but it isn't possible with v1 of Linq to SQL or Linq to Entities.
     
    - Danny
     

  • RELEVANCY SCORE 2.58

    DB:2.58:Problem Using A Linq To Sql Datacontext f3


    I have created a Linq To Sql entity using the drag and drop method in Visual Studion 2008.  I have then inherited from a base class to provide some standard behaviors. After compiling with no error, I try to use the entity on a test web page, but I get an error that The type 'Agent' is not mapped as a Table.What could be causing this type of error?The code generated via drag and drop is:
    Table(Name:=

    dbo.tblAgent) _

    Partial Private _QBVendorListID As String

     
    The error occurs in the following code:Public ReadOnly Property Agents() As System.Data.Linq.Table(Of Agent) Get
     
    Return Me.GetTable(Of Agent) End Get
    End PropertyThe following code does the inheriting from the base class:Imports System
     
    Partial

     

    Public Class Agent
     

    Inherits EntityBase(Of Agent)
     

    Protected Overrides Sub Validate()
     

    End Sub
    End

     

    Class
     

    etc.

    DB:2.58:Problem Using A Linq To Sql Datacontext f3

    When you drag tables into the dbml file then the connection is reset.If you have defined the connection in the base, then every time you drag a table in, you need to click a white part of the dbml file and set the connection to none in properties.

  • RELEVANCY SCORE 2.57

    DB:2.57:Using Linq Objects In Workflows pp


    I have recently upgraded my entity objects from framework 2.0 to framework 3.5 using sqlmetal to utilize LINQ in application.  When this new entity object is passed to my workflow it terminates while persisting the workflow to database with the following error:
     
    Type 'System.Data.Linq.ChangeTracker+StandardChangeTracker' in Assembly 'System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.
     
    Clearly the runtime is unable to serialize the new entity object.  Is there some workaround for using the linq based entity object or is there some thing that I have missed? 
     
    I would appreciate all the suggestions to rectify this problem.
     
    Thanks

    DB:2.57:Using Linq Objects In Workflows pp

    Hey Qiang,
     
    Thanks for your input.
     
    I am aware of the BinaryFormatter Class and  the SerializableAttribute Class.  The problem is my entity class generated through sqlmetal and it's base base class is marked as serializable. I cannot mark the class System.Data.Linq.ChangeTracker+StandardChangeTracker as serializable because it is some internal class of the framework which I cannot modify.
     
    Is this a framework issue or something I am not doing propertly?

  • RELEVANCY SCORE 2.57

    DB:2.57:Vs2008 Windows Form Crud Application: How To Enable Linq Or/M In Databindings / Bindingnavigator zj


    Hi, I have a Windows Forms CRUD application with lots of databound textboxes which maintains data in a SQL server database. The textboxes were databound to the columns of the database either manually in the windows forms designer, or by drag-drop from the data sources panel in the windows forms designer.I am using Linq to SQL in other parts of my application and would like to databind the textboxes to my datatable fields using Linq instead of the ADO.NET connection and methods hidden in the designer code. I would like to do this so I can programatically manipulate data within the windows form using commands, and object.fieldname references rather than dealing with textbox.text objects to access the data.How do I need to wire up the bindingsource and binding navigator in order to get the textboxes to reflect true bidirectional O/R mapping between the database, textboxes, and in-memory objects in the form of object.field?My datacontext, tables, and row objects are all accessible, but not through the textboxes which are populated via the bindingsource and bindingnavigator.Thanks, -BGoodas Linq objects

    DB:2.57:Vs2008 Windows Form Crud Application: How To Enable Linq Or/M In Databindings / Bindingnavigator zj

    kinda thought you should check the architecture of RocketFramework
    http://rocketframework.codeplex.com/
    It is a great open source project

  • RELEVANCY SCORE 2.57

    DB:2.57:Linq To Sql Serialization ps


    Hi All. My question is simply.
    I have a Photos Table in SQL Server, the field of it are the follow
    [ PhotoID int,
    EmployeeID int,
    Photo IMAGE,
    LastChanged timestamp ]
    Now, When i drag and drop the table onto desginer
    the type of data IMAGE of the field Photo is converted to Linq.Binary.
    but i want that Linq Designerto converts it in Sistem.Byte() (an array of byte)
    I select the Photo table in the designer and i can change manually the type to Byte() (System.Byte[]) So far so good.
    But i cant modify stored procedures. Tha Linq Desinger shows me the follow sp:
    spInsertPhoto (ByRef photoID As System.Int32, employeID As System.Int32, photo As System.Data.Linq.Binary , LastChanged As System.Data.Linq.Binary)
    So I need to search in MyDbLinq.Designer.vb, the code of spInsertPhoto and spUpdatePhoto and change manually
    System.Data.Linq.Binary to System.Byte[].
    Does anybody know how to set the environment variables of Visual Studio 2008 to Linq designer serializes the type image to System.Byte[] intead of
    System.Data.Linq.Binary?
    In my db I have a lot of fields image (these fields are imported from all db), but i prefer to use VarBinary(Max) so i need to Linq Designer converts VarBinary(Max) and image data type to
    System.Byte[].
    Thanks Luis

  • RELEVANCY SCORE 2.56

    DB:2.56:Sql Table Valued Parameters In Linq fd


    Hi
    Can anyone please let me know if the followin is supported in .net framework 4.0?
    I have a sql stored procedure with one of its parameter as Hierarchy data type( i suppose its a table valued parameter).. trying to drag this stored procedure onto my linq design studio is not being allowed?
    How can I use such a stored procedure in my application?

    Thanks,

    DB:2.56:Sql Table Valued Parameters In Linq fd

    Hi,
    Here are some relevant links, maybe they will give you some helps:
    http://betaforums.silverlight.net/forums/p/146613/326427.aspx
    http://xamlgeek.net/2010/05/05/execute-stored-procedure-in-wcf-ria-services/
    http://drc.ideablade.com/xwiki/bin/view/Documentation/Code_AsyncStoredProcQueriesSL
    Hope this helps.

    Regards

  • RELEVANCY SCORE 2.56

    DB:2.56:Linq To Access And Other p3


    I have two questions regarding LINQ to SQL with C#:1) I have northwind.mdb and i would like use this file with O/R Designer, but when i drag a table on the interface of O/R Designer, I obtain an error about fact that this provider isn't supported. How can i resolve this problem?LINQ to SQL supports Access?2) I have a single file .mdf and I want add to my project. When i do it, a messagge error diplays saying that i don't have SQL Server Express 2008, because in my PC is installed SQL Server 2008 Standard Edition. I set as data source Database file Microsoft SQL Server. Where am I mistaking?Is it possible add a file .mdf without SQL Server Express?Thanks

    DB:2.56:Linq To Access And Other p3

    HI
    1) unfortunatley we can't use mdb file directly to the LINQ to SQL. we may create our own classes and prperties andwe can map it. otherwise some of third parties are there.

  • RELEVANCY SCORE 2.56

    DB:2.56:Storing Business Objects As Xml Using Linq To A Xml Column In Sql Server pm


     
    I have a business object instance that is large. I can't find a single example on serializing a large XML representation of this business object to the XML datatype column in SQL Server using LINQ.  In the LINQ designer, it is showing the property of the class representing a record in that table as having a type System.Xml.Linq.XElement.  How do I set this field with a document?
     
     
    Thanks!
    Steve
     
     

    DB:2.56:Storing Business Objects As Xml Using Linq To A Xml Column In Sql Server pm

    Can you please send me the sample for this, i.e storing the XElement LINQ type to the XML data type column in SQL server. ?
     
     
    Thanks
    Kprashu
     
     
     

  • RELEVANCY SCORE 2.55

    DB:2.55:Linq Or Nhibernate ? ac



    I was planing to create my dataacess layer  using NHibernate.
    But some people say that LINQ (LINQ to SQL or even  LINQ to Objects) is better than NHibernate.
     Do any one have any suggestion on on this 2?(i am creating web application)

    DB:2.55:Linq Or Nhibernate ? ac

    HiI've done three projects with Nhibernate.it's perfect in web application.One of these project has about 3000 users. and I dont have any problem with nhibernate.I seggest it.

  • RELEVANCY SCORE 2.54

    DB:2.54:How To Use Objects With Linq j9


    I dragged a table onto the designer after adding a Linq to SQL file. For brevity the table is called customers and has CustomerId, Name and Age.
    How could i use a Customer object i.e. a class that has properties mimicing the fields in the table that could be used with an N Tier app?
    Thanks

    DB:2.54:How To Use Objects With Linq j9

    I'm doing something like this every time.

    I drop all of my database objects into DBMLI'm creating classes that do only transport job. Take parameters from the interface layer and pass them to DB or viceversa.
    For Example lets consider CustomerService
    namespace CustomerService
    {
    public class Customer
    {
    public int ID { set; get; }
    public string FName { set; get; }
    public string LName { set; get; }

    public void UpdateCustomer(int ID, string FName, string LName)
    {
    NWDataContext db = new NWDataContext();
    var entity = db.Customers.Where(c = c.CustomerID == ID).FirstOrDefault();
    if (entity != null)
    {
    entity.FirstName = FName;
    entity.LastName = LName;
    db.SubmitChanges();
    }
    }
    }
    }

    Please Mark as Reply and Vote as Helpful if I helped.

    Also please visit my blog http://msguy.net/

  • RELEVANCY SCORE 2.54

    DB:2.54:Linq And Oledbtypes kx


    I'm new to linq and i'm trying to connect to an access file but every time i try to drag and drop tables from the server explorer to the .dbml i get an error stating The selected object(s) use an unsupported data provider.I tried having the same table in SqlServer and then i'm able to do this with out a problem.The only difference (that i can see) is that the data type is OleDbType.Integer in access but Integer in SqlServer.So too finally ask the question, does linq only support sqlserver and not oledb connections?

    DB:2.54:Linq And Oledbtypes kx

    Thanks for the fast response.....even though the answer was not exactly what i wanted to hear

  • RELEVANCY SCORE 2.54

    DB:2.54:New To Linq, Should I Use Linq Wiht Sql Or Entities Or Object ? Plz Guide xm


    Hello, Please guide for a person who is adopting Linq; how Linq should be used. Should I use Linq with entities or objects or with SQL. Secondly is there speed advantage (fast data access) in any of Linq ways (entities or objects or with SQL) ? Third and last, is using stored procedures with Linq faster than others ? Thanks for your attention, time and sharing. haansi

    DB:2.54:New To Linq, Should I Use Linq Wiht Sql Or Entities Or Object ? Plz Guide xm


    Please guide for a person who is adopting Linq; how Linq should be used. Should I use Linq with entities or objects or with SQL.

    LINQ to Objects is for in memory collections. You will find it pervasive once you get the data you need from LINQ to SQL/Entities and perform further processing on it. Deciding to use LINQ to SQL (L2S) or LINQ to Entities and the Entity Framework (EF) depends on your goals. L2S only works with SQL Server, whereas EF can be used with different databases. It also depends on whether you plan to use your own classes or just the ones generated for you. I suggest searching for LINQ to SQL versus LINQ to Entities and reading some articles. To get you started, here's a breakdown from Microsoft with a checklist of possibilities: Introducing LINQ to Relational Data . FYI, Microsoft's recommendation is to use EF. Per this ADO.NET team blog post , as of .NET 4.0 the Entity Framework will be our recommended data access solution for LINQ to relational scenarios.

    Secondly is there speed advantage (fast data access) in any of Linq ways (entities or objects or with SQL) ?

    Usually traditional coding will yield better performance, but not so much to shy away from using LINQ. In fact, LINQ typically lets you get more things done in a shorter amount of time, thereby cutting down on development time. A regular SqlDataReader will be closer to the metal and give better performance than LINQ to SQL/EF. Again, it's no reason not to use these technologies. In fact, there are ways to enhance perfomance, such as using compiled queries and turning off entity tracking for a readonly query when updates aren't expected. The area where L2S noticeably suffers is in updates and deletes since a query is generated for each record. For this problem you can always use SQL directly or call a stored procedure. I'm not too familiar with EF so I'm not sure whether it suffers from the same problem (I imagine it doesn't). There's also a useful workaround for this: Batch Updates and Deletes with LINQ to SQL .

    Third and last, is using stored procedures with Linq faster than others ?

    Using stored procedures might get you faster speeds than direct LINQ to SQL / EF for certain operations (you would have to test). As mentioned above, the areas that would benefit from this are update and delete statements. Then again, if there isn't heavy use of updates/deletes you may get by just fine without addressing these issues.Document my code? Why do you think it's called code?

  • RELEVANCY SCORE 2.54

    DB:2.54:Not Supported Exception 1z


    I am creating list of EmployeeHierarchy class and using that list in LINQ to join with other table using EmployeeID as key. EmployeeID exist in the table as well as List.
    varempDatelist =
    (froml
    indb.TimeSheetDetails
    frome
    inempList

    wherel.ManagerApproved ==
    false l.EmployeeApproved
    == true l.EmployeeID
    == e.EmployeeID

    selectnew{
    l.EmployeeID, l.WeekEndingDate }).Distinct();

    Please advise. See below exception detail
    System.NotSupportedException was unhandled by user code
    Message=Unable to create a constant value of type 'TimeTracking.Models.EmployeeHierarchy'. Only primitive types ('such as Int32, String, and Guid') are supported in this context.
    Source=System.Data.Entity
    StackTrace:
    at System.Data.Objects.ELinq.ExpressionConverter.ConstantTranslator.TypedTranslate(ExpressionConverter parent, ConstantExpression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.NewArrayInitTranslator.c__DisplayClass77.TypedTranslateb__75(Expression e)
    at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
    at System.Data.Common.CommandTrees.ExpressionBuilder.Internal.EnumerableValidator`3.Validate(IEnumerable`1 argument, String argumentName, Int32 expectedElementCount, Boolean allowEmpty, Func`3 map, Func`2 collect, Func`3
    deriveName)
    at System.Data.Common.CommandTrees.ExpressionBuilder.Internal.EnumerableValidator`3.Validate()
    at System.Data.Common.CommandTrees.ExpressionBuilder.Internal.ArgumentValidation.CreateExpressionList(IEnumerable`1 arguments, String argumentName, Boolean allowEmpty, Action`2 validationCallback)
    at System.Data.Common.CommandTrees.ExpressionBuilder.Internal.ArgumentValidation.ValidateNewCollection(IEnumerable`1 elements, DbExpressionList validElements)
    at System.Data.Objects.ELinq.ExpressionConverter.NewArrayInitTranslator.TypedTranslate(ExpressionConverter parent, NewArrayExpression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.ConstantTranslator.TypedTranslate(ExpressionConverter parent, ConstantExpression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateLambda(LambdaExpression lambda, DbExpression input)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateLambda(LambdaExpression lambda, DbExpression input, DbExpressionBinding binding)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, DbExpression source, DbExpressionBinding sourceBinding,
    DbExpression lambda)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SelectManyTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, DbExpression source, DbExpressionBinding sourceBinding,
    DbExpression lambda)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, DbExpression source, DbExpressionBinding sourceBinding,
    DbExpression lambda)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SelectTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.GroupByTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, DbExpression source, DbExpressionBinding sourceBinding,
    DbExpression lambda)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SelectTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateLambda(LambdaExpression lambda, DbExpression input)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateLambda(LambdaExpression lambda, DbExpression input, DbExpressionBinding binding)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, DbExpression source, DbExpressionBinding sourceBinding,
    DbExpression lambda)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SelectManyTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, DbExpression source, DbExpressionBinding sourceBinding,
    DbExpression lambda)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, DbExpression source, DbExpressionBinding sourceBinding,
    DbExpression lambda)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SelectTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.GroupByTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, DbExpression source, DbExpressionBinding sourceBinding,
    DbExpression lambda)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SelectTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
    at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
    at System.Data.Objects.ELinq.ExpressionConverter.Convert()
    at System.Data.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption)
    at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
    at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerableT.GetEnumerator()
    at System.Data.Entity.Internal.Linq.InternalQuery`1.GetEnumerator()
    at System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerableTResult.GetEnumerator()
    at TimeTracking.Controllers.ManagerController.ManagerList() in C:\Users\BV\Documents\Visual Studio 2010\Projects\TimeTracking\TimeTracking\Controllers\ManagerController.cs:line 118
    at TimeTracking.Controllers.ManagerController.Index() in C:\Users\BV\Documents\Visual Studio 2010\Projects\TimeTracking\TimeTracking\Controllers\ManagerController.cs:line 28
    at lambda_method(Closure , ControllerBase , Object[] )
    at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
    at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
    at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
    at System.Web.Mvc.ControllerActionInvoker.c__DisplayClass15.InvokeActionMethodWithFiltersb__12()
    at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
    InnerException:

    bv

    DB:2.54:Not Supported Exception 1z

    Not a problem Biju, glad I was able to help.
    Fernando (MCSD)

    If a post answers your question, please click Mark As Answer on that post and Mark as Helpful.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects
    and unknown namespaces.

  • RELEVANCY SCORE 2.54

    DB:2.54:Ms Knowledge Base: Bagaimana Cara Menggunakan Linq Untuk Objects Queries? 1x


    Artikel ini menjelaskan tentang
    All-In-One Code Framework
    yang tersedia untuk di-download. Sampel
    kode ini menunjukkan bagaimana menulis LINQ untuk query Objek termasuk beberapa operasi
    dasar
    LINQ seperti SELECT, UPDATE, ORDER BY, MAX dan AVERAGE dengan menggunakan Visual C # dan Visual Basic.
    NET.

    Tingkat Kesulitan

    Pemula
    Pembahasan Teknis
    Istilah LINQ untuk Objects mengacu pada penggunaan LINQ query dengan IEnumerable atau IEnumerable(T)
    collection secara langsung, tanpa menggunakan intermediate
    LINQ provider
    atau API
    seperti
    LINQ to SQL atau LINQ
    to XML. Anda dapat menggunakan LINQ untuk query
    enumerable collection manapun seperti List (T), Array, atau
    Dictionary (TKey, TValue).
    Koleksinya mungkin berupa user-defined atau
    returned by
    .
    NET Framework
    API.

    Dalam pengertian dasar, LINQ untuk Objects
    query merupakan pendekatan baru untuk
    collections. Dalam cara lama,
    anda harus menulis foreach
    loop
    kompleks yang
    menjelaskan cara untuk mengambil data dari
    collection. Dalam pendekatan LINQ,
    anda menulis kode deklaratif yang
    menjelaskan apa yang ingin Anda ambil.

    Selain itu, query LINQ memiliki tiga keunggulan utama dibandingkan dengan foreach loop tradisional:

    1.
    LINQ query lebih ringkas dan mudah dibaca, terutama ketika
    melakukan filtering multiple conditions.
    2.
    LINQ
    query menyediakan
    proses filterisasi yang bagus,
    ordering, dan
    kemampuan
    grouping
    dengan

    Minimum lines kode aplikasi.
    3.
    LINQ query bisa
    diporting ke sumber data lain dengan sedikit modifikasi atau tidak
    ada modifikasi.

    Secara umum,
    semakin rumit
    operasi yang
    anda ingin lakukan pada data,
    anda akan semakin mendapatkan
    manfaat dengan menggunakan LINQ query
    dibandingkan teknik iteration
    tradisional.

    Catatan Untuk informasi lebih lanjut tentang cara membuat
    sampel
    aplikasi dan bagaimana untuk menggunakan
    sampel
    aplikasi, lihat file readme.txt yang disertakan dalam paket download.

    Kategori Teknologi

    LINQ

    Bahasa Pemograman

    Sampel kode ini memuat bahasa pemograman dibawah ini:
    Collapse this tableExpand
    this table

    Language

    Project Name

    Visual C#

    CSLinqToObject

    Visual Basic.NET

    VBLinqToObject

    Prasyarat

    Sampel aplikasi ini dibuat menggunakan
    Visual Studio 2008 Service Pack 1.

    Tags

    LINQ to Objects

    Referensi

    http://support.microsoft.com/kb/2278185/en-usAgnes Sannie [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    DB:2.54:Ms Knowledge Base: Bagaimana Cara Menggunakan Linq Untuk Objects Queries? 1x

    Artikel ini menjelaskan tentang
    All-In-One Code Framework
    yang tersedia untuk di-download. Sampel
    kode ini menunjukkan bagaimana menulis LINQ untuk query Objek termasuk beberapa operasi
    dasar
    LINQ seperti SELECT, UPDATE, ORDER BY, MAX dan AVERAGE dengan menggunakan Visual C # dan Visual Basic.
    NET.

    Tingkat Kesulitan

    Pemula
    Pembahasan Teknis
    Istilah LINQ untuk Objects mengacu pada penggunaan LINQ query dengan IEnumerable atau IEnumerable(T)
    collection secara langsung, tanpa menggunakan intermediate
    LINQ provider
    atau API
    seperti
    LINQ to SQL atau LINQ
    to XML. Anda dapat menggunakan LINQ untuk query
    enumerable collection manapun seperti List (T), Array, atau
    Dictionary (TKey, TValue).
    Koleksinya mungkin berupa user-defined atau
    returned by
    .
    NET Framework
    API.

    Dalam pengertian dasar, LINQ untuk Objects
    query merupakan pendekatan baru untuk
    collections. Dalam cara lama,
    anda harus menulis foreach
    loop
    kompleks yang
    menjelaskan cara untuk mengambil data dari
    collection. Dalam pendekatan LINQ,
    anda menulis kode deklaratif yang
    menjelaskan apa yang ingin Anda ambil.

    Selain itu, query LINQ memiliki tiga keunggulan utama dibandingkan dengan foreach loop tradisional:

    1.
    LINQ query lebih ringkas dan mudah dibaca, terutama ketika
    melakukan filtering multiple conditions.
    2.
    LINQ
    query menyediakan
    proses filterisasi yang bagus,
    ordering, dan
    kemampuan
    grouping
    dengan

    Minimum lines kode aplikasi.
    3.
    LINQ query bisa
    diporting ke sumber data lain dengan sedikit modifikasi atau tidak
    ada modifikasi.

    Secara umum,
    semakin rumit
    operasi yang
    anda ingin lakukan pada data,
    anda akan semakin mendapatkan
    manfaat dengan menggunakan LINQ query
    dibandingkan teknik iteration
    tradisional.

    Catatan Untuk informasi lebih lanjut tentang cara membuat
    sampel
    aplikasi dan bagaimana untuk menggunakan
    sampel
    aplikasi, lihat file readme.txt yang disertakan dalam paket download.

    Kategori Teknologi

    LINQ

    Bahasa Pemograman

    Sampel kode ini memuat bahasa pemograman dibawah ini:
    Collapse this tableExpand
    this table

    Language

    Project Name

    Visual C#

    CSLinqToObject

    Visual Basic.NET

    VBLinqToObject

    Prasyarat

    Sampel aplikasi ini dibuat menggunakan
    Visual Studio 2008 Service Pack 1.

    Tags

    LINQ to Objects

    Referensi

    http://support.microsoft.com/kb/2278185/en-usAgnes Sannie [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • RELEVANCY SCORE 2.53

    DB:2.53:Table Within A Table Cell In Pages? 83


    I'm working on a table-heavy lab report in Pages, with headings in a column along the left side of the page and the content in the adjacent right cells. However I want to insert another small table into one of the right cells and have been unable to get the results I want. Hopefully there's a Pages master who can lend a hand.
    When I've selected the cell, the Add Objects button and Insert Table options are greyed out. If I create the small table outside of the large table and then try to paste it into the large table's cell, Pages takes the first cell of the small table and fills the large table's cell with that content.
    So far my workaround has been to tell Pages to make the small table fixed on page and then drag it to the cell area and leave blank lines to accomodate it, but whenever I add a line to what I've written above I have to move the small table back down so it's in the right spot, and it's getting to be a pain.
    Anyone know how I could remedy this?

    DB:2.53:Table Within A Table Cell In Pages? 83

    emutree,

    maybe you could use text objects for headings and text cells. Then you can place a table into (one of) the textbox(s) that acts as "right cell".

    Choose "View/Show Layout" when you place the text objects.

  • RELEVANCY SCORE 2.53

    DB:2.53:Scene Editor Problem - Unable To Move Objects x3



    Are you sure that you are not trying to do that in the Game view, instead of the Scene? In the Scene window a simple ALT + mouse drag will rotate your view around current point.

  • RELEVANCY SCORE 2.53

    DB:2.53:Linq To Sql And Mapping Tables k1


    I have a table called AlbumSongs that consists of an AlbumID and a SongID. The purpose of this table is to associate a song to a particular album. There are two separate tables called Albums and Songs that contain the values. Would I drag the AlbumSongs mapping table onto the designer surface?  I don't understand how Linq to Sql would handle this situation and how I would program against it. Any opinions? Thanks.

    DB:2.53:Linq To Sql And Mapping Tables k1

    Hello,Many to many relationship in LINQ is a big topic for a friday evening... Although this article is a bit old now, it will still help: http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx Good Luck.LS

  • RELEVANCY SCORE 2.53

    DB:2.53:Linq To Objects ds


    What is the best forum for a LINQ to Objects question?

    DB:2.53:Linq To Objects ds

    Sorry, I always send query to DB to utilize indexes and don't use in-memory query that much. Try ask athttp://social.msdn.microsoft.com/Forums/en-US/home?forum=adodotnetdataset.
    Visual C MVP

  • RELEVANCY SCORE 2.53

    DB:2.53:Drag And Drop Between Different Flash Objects d1



    It is possible to drag drop items between different flash objects?

    DB:2.53:Drag And Drop Between Different Flash Objects d1


    Yes, you can drag and drop anywhere on the stage. You'll need to explain things in more detail if there's more to your question.

  • RELEVANCY SCORE 2.53

    DB:2.53:Modify Linq To Sql (Dbml) File cd


    I have the following two questions:
    1. In a linq to sql (dbml) file for a C# web form 2010 application that connects to sql server 2008 r2 database, I want to modify the size of one of the columns in a specific table called main. To do that, I dragged the table off of the designer surface.
    I then dragged a new table onto the desginer surface that contained the modified table. This worked ok.
    My problem is the table that I modified has has foreign key references to six different tables. Thus on the designer surface, the main table still has the references to all the applicable tables. However instead of showing one line on the designer surface,
    there are 4 to 5 references of the main table poiner to each of the other tables. In other words you have table main and it has 5 references to submain2. I would think the desginer should have main table only show one reference to submain2 (not 5 references).
    2. There is a view that uses the table called main where a column size has changed that is contained within the .dbml file.I would think that I need to drag that view off of the desginer surface and drag the new view onto the designer surface,
    correct? If not, what do I need to do?
    Thus can you tell me what to do to solve the problem(s) listed above?

    DB:2.53:Modify Linq To Sql (Dbml) File cd

    Hi wendy;

    To your statement, Can I go into the *designer.cs file and open the file with a xml text editor. I would then go to the field in the two tables I need to change and change the values in those locations?,
    I am no expert in manipulating the XML by hand but to answer your question yes that can be done butrequires moreexpertise that I can give.

    To your question, Do you have other suggestions?, If you have not changed any of the table names or columns names in the tables or only changes a small number of names then what I would
    do is to select all the tables and relationships on the design surface and delete them making sure you save the file after doing that then drag all the tables from the Server Explorerthat you had previously
    had there recompile making sure that you change any table or column names that you may have changed before.
    Fernando (MCSD)

    If a post answers your question, please click Mark As Answer on that post and Mark as Helpful.

  • RELEVANCY SCORE 2.53

    DB:2.53:How Do I Get Linq To Join On Many-To-Many Relations? 19


    Hi everyone! I have noticed that Linq behaves strangely with the way I define many-to-many relations in my database. I have tried to search this forum and I have read a number of blog posts about many-to-many relations, but I can't figure out what I am doing wrong, so I thought I would ask the question here. Perhaps some of you guys can give some pointers on how I can improve the performance, either by defining the relations differently or by writing better Linq queries. Okay, consider the following minimal test database: Table: User - (PK) ID, int - Name, varchar(50) not null Table: Order - (PK) ID, int - Product, int not null - Amount, varchar(50) not null Table: UserOrder - UserID, int references User.ID - OrderID, int references Order.ID PK for this table is (UserID, OrderID) Given that database I add a .dbml file to my project and drag the three classes into the designer, and then I run the following two Linq-queries:

    var model = new
    DataClasses1DataContext();
    var user = model.Users.Single(x = x.Name == TestUser
    );
    var orders = user.UserOrders.Select(x = x.Order).ToList();br/

    DB:2.53:How Do I Get Linq To Join On Many-To-Many Relations? 19

    Thank you! That was an excellent explanation, as I was reading it I could just feel the light come on in my head. I'm actually almost embarrassed that I didn't realize that myself - but anyway I do realize it now :-) Oh and I already bought Linqpad - it is really terribly useful :-) Sincerely, Anders Madsen

  • RELEVANCY SCORE 2.53

    DB:2.53:Linq To Sql 7s


    I am not getting any table to drag and put to the linq to sql classes.

    DB:2.53:Linq To Sql 7s

    Glad that helped you out. Please Mark As Answer on that post and Mark as Helpful
    Thank you.If a post answers your question, please click Mark As Answer on that post and Mark as Helpful.

  • RELEVANCY SCORE 2.53

    DB:2.53:New To Linq, Plz Guide And Help Me 91


    I am new to Linq after your advice I searched about Linq, I was developing with Enterprise Library (DAAB) that is why I dont know even basics of Linq. Please guide me. Q1. Can Linq fill List of objects ? Like in general we create objects and fill there list for data access. Q2. Can we use Linq with DAAB ? If we do this any advantage or disadvantages ? Q3. In examples I got Linq returns var. Can It return other data structures ? Like array or list again ? Q4. Using Linq what will be return type of DAL functions ? Q5. After LInq dont we use business types ? Q6. What are typical layers (Architecture) for Linq projects. please guide , thanks in anticipation haansi

    DB:2.53:New To Linq, Plz Guide And Help Me 91

    Please advice how a large no records can be inserted into db using Linq ? suppose in a list or datatable I have 5000 records. Is it possible to insert all of them in one go and not sending 5000 calls to db. thanks

  • RELEVANCY SCORE 2.53

    DB:2.53:Linq To Sql Not Handling Sp_Executesql Or Into #Temp xs


    HelloI have been trying to map a SPROC containing a SQL string that I concatenate together. It is then executed like this: EXEC sp_executesql @sqlWhen I drag this to the LINQ/SQL designer, the return type generated is INT. It is not recognizing it as returning a table. So I then changed the SQL command to execute without using sp_executesql. The query is a SELECT into a #TEMP cursor. This did not work either. The designer could not recognize the #TEMP table either. When I changed it to not to use a temp table, then it worked. Sounds like this might be related to a similiar problem documented here:http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2950555SiteID=1Is my description been repeated? Any work arounds?ThanksHarold

    DB:2.53:Linq To Sql Not Handling Sp_Executesql Or Into #Temp xs

    Just check this link
    http://devio.wordpress.com/2009/03/26/select-from-temp-table-in-stored-procedure-with-linq-to-sql/

  • RELEVANCY SCORE 2.53

    DB:2.53:[Ask] Linq And Mysql pm


    Hi, I am new to Linq. I have tried it with SQL Server and it works. But now I want to use MySQL Server, when I add an item 'LINQ to SQL Classes'. And go to server explorer then add a new connection to my MySQL Server. It works until there. When I tried to drag and drop a table from MySQL Server into my 'DataClasses1.dbml' working area, I got an error message like this 'the selected object(s) use an unsupported data provider'. How can I solve it? Can I use Object Relation Designer for MySQL provider? If can't, is there any alternative so I still can use it? Note: I already tried 'Dblinq' and add references, but still the same error. Thanks.

    DB:2.53:[Ask] Linq And Mysql pm

    I haven't used one so can't actually recommend any but a quick search showed:

  • RELEVANCY SCORE 2.53

    DB:2.53:Linq And Inheritance p7


    Hi,
    Im dealing with problem in LINQ to SQL. I made simple object model using designer. Data are stored in one table. Im using discriminator property to create hierarchy of 3 objects: Person, Teacher and Student (both descendants of Person).
    There are no problems when inserting data. However, in case I insert a Teacher or Student object, Im unable to delete that row (inserting or deleting Person type is ok).
     
     

    Code Snippet

    DB:2.53:Linq And Inheritance p7

    Hi Zajda,
    I am not sure, perhaps just like the Table field of the database, sometimes the field was not allowed to be NULL, and the Title property of the Teacher object was also not permitted to set as NULL. you can try to assign some value or just empty string to fix issue.
    Regards,
    Xun
     

  • RELEVANCY SCORE 2.53

    DB:2.53:Linq To Objects Cast Problem 7k


    Hi,

    i've written the following class:public class A{ public static implicit operator A(B instance) { return new A(instance); } // ...}
    However, when i create a ListB and call CastA().ToList() i get a runtime error saying Unable to cast object of type 'B' to type 'A'. However, when i do a simple implicit, or explicit, cast from B to A it works fine.

    Thoughts?

    DB:2.53:Linq To Objects Cast Problem 7k

    Here's a discussion from this forum about this change.
     
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3895492SiteID=1
     
    Note that Cast's behavior changed from 3.5 to 3.5SP1, so you could have code that breaks if you test in one but not the other.
     

  • RELEVANCY SCORE 2.52

    DB:2.52:Storing Objects In Database 3x


    I am trying to store serializable objects in the database using Linq to Sql. I have created a binary field in the table. When I drop the table on the designer it creates a byte array as the property type. Then I use BinaryFormatter to Serialize and Deserialize from this byte array. It is working, but I have noticed that I can also set the property as an object in the designer. When I set the property as object it throws an exception. Is there any simple way to store an .net object into database using Linq to SQL.

    DB:2.52:Storing Objects In Database 3x

    So how would you pull out an image, such as a JPG, that is stored in a database as a byte array?  Linq seems to throw an exception when converting to a byte array from a anonymously typed byte array. 
    Dim b() As Byte = From t In DC.Images Select t.Image Take (1)
    Unable to cast object of type 'System.Data.Linq.DataQuery`1[System.Byte[]]' to type 'System.Byte[]'.
    EDIT:
     
    Nevermind.Dim o = From t In DC.Images Select t.Image Take (1)
    Dim b() As Byte = o.Single

  • RELEVANCY SCORE 2.52

    DB:2.52:Silverlight Database Linq Webservice Interaction 1j


    HI,
    how are you passing data from DAL (Linq queries) to Silverlight project for data binding.
    Eg.Linq Query Select * from employees where pay2000 is in DAL C# class library project.
    WEBService in Asp.net web project pulls data from dal project and silverlight pulls data by calling webservice...
    I want to ask how are you passing query results that contain multiple columns..... coverting them to dataset or XML or what format? since i am unable to access entity objects from dal layer in silverlight project

    DB:2.52:Silverlight Database Linq Webservice Interaction 1j

    I am not asking for datasets to be passed to silverlight. I just want to know the best way or see an example to build something like datagrid in silverlight. Do you have any samples????

  • RELEVANCY SCORE 2.52

    DB:2.52:Resyncing The Linq To Sql Class Model? f7


    Hi folks,
    when i change the structure of my sql tables -- say, change a type from a varchar to . say .. an int -- the linq to sql class model (eg. project.dbml) is not updated or sync'd. Is there a way to sync the model with the db? currently, i have to delete the 'table' in the class model, then drag-n-drop / re-add it back.
     
    cheers

    DB:2.52:Resyncing The Linq To Sql Class Model? f7

    Late reply, but better late than never.
     
    I have an add-in that can re-sync models with the underlying database, updating the model with changes only. (+ a bunch of other L2S-related features: renaming entities and members based on rules, generating SQL-DDL, documenting classes and members with DB-descriptions etc).
     
    You can download it and get a free trial license from http://www.huagati.com/dbmltools/

  • RELEVANCY SCORE 2.52

    DB:2.52:Trying To Resolve - Transaction Context In Use By Another Session.. pa


    My development enviroment is visual studio 2008. If using LINQ to SQL in .NET3.5 SP1
    I've got a database service that uses LINQ to SQL table objects to open up tables. Each LINQ to SQL table object is a separate project with a LINQ to SQL class file that has a table in it.
    When the service starts up, it ups open each table using the constructor that allows me to pass a sqlconnection object. Each table gets its own sqlconnection object. I used the sql connection object because I allow the user to set the userId
    and password.

    These linqtoSQL table objects are global variables in my service.
    Because this service can handle multiple clients at the same time ... I have wrapped the logic that updates each table in
    SyncLock lockobject for the table
    ''' create new table record
    linqtosqlTableObject.InsertOnSubmit
    linqtosqlTableObject.SubmitChanges

    Or
    make my updates to an existing table record
    linqtosqlTableObject.SubmitChanges
    End SynLock.

    What I keep getting is Transaction context in use by another session. I would really think SyncLock/End SyncLock would limit access to a table to one thread at at time.
    Just how long does it take for the TransactionContext used by the LINq to SQL framework to be freed up , say even after the Synclock is freed ?
    I'm thinking that even though I have freed up the sync lock object it, there is still a pending transaction that need to complete yet ?

    What have other people seen ? Thanks !
    Rob Hermann

    DB:2.52:Trying To Resolve - Transaction Context In Use By Another Session.. pa

    This is a bit late but I ended up restructing my service:
    Seeing how i'm sharing my database layer among the clients....

    1. I use stored procedures instead of the linq to SQL tableobjects for CRUD operations. Stored procedures are much faster than the LINQ to SQL table objects.
    2.Each client that comes in gets its own copy of some thestored procedure handles. The shared storedprocedures variables i have in my database layer gets set to the incoming client copy of the stored procedures.
    I have SyncLock objects as well.
    3. I broke up thedatabase updates within the transactions to more more transactions with less operations instead of less transactions and more operations.

    Rob Hermann

  • RELEVANCY SCORE 2.52

    DB:2.52:Linq To Sql New Object Problem. c3


    Hi Team,Linq to SQL is a really very very cool thing which we every had from Microsoft.Everything is just fine, except one thing we found...We use ToList() method to populate lookup data tables and access them later everywhere to prevent Linq to SQL to query DB every time, right?That' works fine.But, when we create an new instance of the any generated class with Table attribute and set any of the related lookup objects to an instance of the lookup data then Linq to SQL automatically insert new row into Change Set.For example:var cut = new Cutomer(){};//At this point as expected Inserts count == 0 and this looks good. dataContext.GetChangeSet().Inserts().Count()//But if we set any related object to an instance from Data Context and even from collection of entities which we get using ToList() method!cut.Orders = dataContext.Order.Sinlge(...);//At this point Linq to SQL think that new Customer should be inserted into DB, but we actually do not except this, as we did not assign any Customer to any Data Context objects, right?As we know new object has untracked status until we add it to any collection of the objects from Data Context or we use dataContext.InsertOnSubmit method, right?We also found that such behavior is happening only when we set any EntityRef properties of our object. Would be great if anybody can clear this situation for us.Thanks and keep going!Best regards,Alex

    DB:2.52:Linq To Sql New Object Problem. c3

    The DataContext 'sees' all objects referenced by the ones it already knows about. It assumes these are to be inserted.
     

  • RELEVANCY SCORE 2.52

    DB:2.52:What Is The Linq To Objects Search Algorithm Based On A Predicate? xz


    hi
    What is the LINQ To Objects search algorithm based on a Predicate?

    DB:2.52:What Is The Linq To Objects Search Algorithm Based On A Predicate? xz

    For other LINQ providers (such as L2S or L2E) the behavior is actually a bit different. The provider translates the LINQ query expression to some sort of algorithm to execute the query. In the case of L2S and L2E the query including the predicate
    is translated to a SQL query.
    But the loop logic is not.
    Instead SQL Server uses its cost-based query optimizer to selectan algorithm (query plan) to execute the query. It might be an index scan, which would be similar to the L2O implementation, but it might use an index a nested loops join, or it
    might use a scan of some secondary index, etc.
    DavidDavid http://blogs.msdn.com/b/dbrowne/

  • RELEVANCY SCORE 2.52

    DB:2.52:Lightweight Inheritance za


    Is there a way to easly fix the basic column (fields) that every entity should have in your database?
     
    I know that is a feature that LINQ is able to save and retrieve simple objects without inheriting from a base class, but for the sake of homogeneity I think would be good to have a custom base class (Entity)  defining the ID, Timestamp and maybe a ‘bool erased’ that almost every entity should have.
     
    This kind of inheritance is different from the one currently available. We don’t need to have a polymorphic reference to an Entity, neither to make queries in terms of the base Entity class, and absolutely we don’t want all the entities mixed in the same table in the database.
     
    Currently Linq to SQL looks very ‘tables first’ (opposite of ‘classes first) for me, and Linq to Entities looks like is moving in a different direction (abstraction from the database). But we are used to an O/R mapper where the classes rules over the database. I think this approach is better if you have to make the application from the scratch without legacy code.
     
    We are going to have something like this included in Linq to SQL, Linq to Entities?
     
    Anyone knows three vendors O/R mappers with LINQ provider supporting this scenario?

    DB:2.52:Lightweight Inheritance za

    Hi,
     
    The only reason why using an interface would be helpful is because you will get compiler errors for the tables which don't match the standard.
     
    The idea of the entitybase that when the code is being generated, it will include the option.  Then when you include the generated code in your solution, the interface will be implemented in there.  Remember, its only a code gen tool.
     
    If a table doesn't match, then you will need to modify the table and regenerate the datacontext which will then pickup the new columns.  This is the only way using Linq to enforce that all the tables implement the same interface.   Not great, but it works.
     
    Ben

  • RELEVANCY SCORE 2.51

    DB:2.51:Drag And Drop Or Double Click To Add Objects To Sql Worksheet cp


    The current functionality of drag and drop is to create an Insert, delete ... statement. I typically am just adding a table or field to an existing query. How can I drag and drop or double click or whatever to just have the object added - without any additional syntax? For example: in toad, I just double click on the object and it adds to my query.

    DB:2.51:Drag And Drop Or Double Click To Add Objects To Sql Worksheet cp

    It would be nice as completion takes forever when you have several hundred schema and tables. I end up having to type the first 8-10 characters, before a list is even presented, then my tables are so close in name, that the list is long.
    I have toad as well, but would rather use sql developer. In toad I can drag and drop or double click to add a schema, table or field. It is way faster and convenient. Without this simple ability, SQL developer is still second rate for me.

  • RELEVANCY SCORE 2.51

    DB:2.51:Linq To Entities Trimend 1f


    I have used the Entity Framework to create a mapping and query data from my database.  Now I would like to use Linq to Entities to select properties from the EF objects into other objects.  Here's an example:
    Private _clientQuery As System.Linq.IQueryable(Of AGY)    'AGY is the EF object mapped to AGY table in my databasePrivate _clients As Generic.List(Of Client)   'Client is a custom business object_clientQuery = (From item In _EFContext.AGY Select item)_clients = (From item In _clientQuery Select New Client() With {.Agency = item.NO.TrimEnd, .AgencyName = item.NAME.TrimEnd}).ToList
    Everything works fine until the last line, when I get the exception: The method 'System.String TrimEnd(Char[])' is only supported in LINQ to Entities when there are no trim characters specified as arguments.  As far as I can see I don't have any arguments on the TrimEnd function. Can anyone shed any light on this?Thanks!

    DB:2.51:Linq To Entities Trimend 1f

    Thanks very much!  I'll look forward to a fix in the future and will use RTrim for now.Matt.

  • RELEVANCY SCORE 2.51

    DB:2.51:Linq To Sql: Inserting New Objects With Stored Procedures 8k


    Another adventure in LINQ land... Have a table Test (TestID int NOT NULL IDENTITY, Name varchar(50)) and a Test class created with the designer. Trying to insert a new object with a stored procedure. The problem is how to get the TestID field populated (Name field works fine) on a test object.
     

    Code Snippet

    DB:2.51:Linq To Sql: Inserting New Objects With Stored Procedures 8k

    It's been a long time since. I still don't see the'right' answer.I am having same issue with VS 2008 /SQL 2008.
    my SP is simple,try to find it first, if not exist, insert.

    procedure [dbo].[InsertOrFind]
    @Email nvarchar(200),
    @ID int
    output
    as
    begin
    select @ID
    = ID
    from MyTable
    where Email
    = @Email

    if @ID
    is
    nul -- not existl
    begin
    insert MyTable(Email)
    values
    (@Email)
    select @ID
    =
    SCOPE_IDENTITY()
    end
    end
    C# code:
    int? myid = 0;
    MyDataClassesDataContext db =
    new
    MyDataClassesDataContext();
    db.InsertOrFind 'my_email', ref myid
    // db.SubmitChanges(); // I also tried SubmitChanges

    when Found, I got myid correctly. But on insert. myid is alway 0.

    I test the SP in SQL Studio and it works find.

    I alsw
    What is the problem? and How can it be fixed.
    Thanks.

    John

  • RELEVANCY SCORE 2.51

    DB:2.51:Where Is The Official Forum For Linq Queries Over Business Objects? fk


    Where is the official forum for Linq queries over business objects?ThanksShrage Smilowitz

    DB:2.51:Where Is The Official Forum For Linq Queries Over Business Objects? fk

    New links!
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=linqtosql
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=adodotnetentityframework
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=adodotnetdataset
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=xmlandnetfx

    Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)

    Answer an interesting question?
    Create a wiki article about it!

  • RELEVANCY SCORE 2.51

    DB:2.51:Vs2012 Problems With Sql Clr Items In Database Project 8j


    After installing the production version of VS2012, I added a new database project, and added a new SQL CLR C# stored procedure.
    However, I am experiencing a number of issues:
    1. There is no intellisense in the source file for the stored procedure.
    2. I am unable to use Linq to objects. After verifying that I had a reference to System.dll, I can not use any Linq extension methods on collections nor have the using System.Linq; statement.
    Our project works fine in VS 2010. I would appreciate any help.
    Thanks!

    DB:2.51:Vs2012 Problems With Sql Clr Items In Database Project 8j

    Hi Andy_T1,
    1). For the no IntelliSense issue, please make sure you do not have some add-ins or special custom settings whichmay block IntelliSense. So, please run the following commands to see if they are helpful:
    -Run devenv /ResetSettings command to restore you VS to the default settings.
    -Run devenv.exe /SafeMode command to disable your VS add-ins.
    -Run Devenv /ResetSkipPkgs command to disableVS packages.
    2). In order to use Linq to objects, instead of referring to the System.dll assembly, you need to add reference to the System.Core.dll assembly which can be found in the path: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5
    Thanks.Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

  • RELEVANCY SCORE 2.50

    DB:2.50:Vs2013 Object Relational Designer Not Working. Doesnt Let Me Drop Tables Onto Surface Of Dbml Designer. fa


    After installing a Visual Studio 2013 Ultimate on new Windows box, I created a connection in solution explorer to a database on a remote server. I can see the tables and view content via view options. I created a simple web form app and added a LINQ to SQL
    Classes object which created the appropriate .dbml objects. I select the dbml object and the object relational designer window editor appears as expected. I then try to drag one of the tables from the solution explorer window and nothing
    happens. ie. I can't drag any table to the dbml visual editor window. I've applied all the latest VS2013 updates/ rebooted/ searched the web and tried various hacks that all resulted in the same above scenario. Help!!!!
    This is a core functionality requirement for most ofour back-end data access and we are at a standstill until this issue can be resolved. Thanks

    DB:2.50:Vs2013 Object Relational Designer Not Working. Doesnt Let Me Drop Tables Onto Surface Of Dbml Designer. fa

    Thank you for sharing the solution here!We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click
    HERE to participate the survey.

  • RELEVANCY SCORE 2.50

    DB:2.50:How To Create Business Entites For A Normalized Database 7f


    I am really getting stuck on how to use Linq to Sql in a meaningful manner. Consider this  table setup: Locator - (PK) LocatorID - (PK) LocatorType (Main Address, Postal address business address etc.) Address - (PK) LocatorID - (PK) LocatorType - Addr1 - Addr2 - Addr3 - Addr4 - PostalCode And I have several tables like this, which I do not want to use directly (i.e. I want more meaninful business entities). So these are the options I have tried. A\ A massive view with a massive Insert update stored procedure     - I did not like this as you seem to get next to no benefit from using Linq to SQL, as you are writing all the code yourself,       and if there are any database changes I have to change quite al to of code, as this view consists of about a dozen tables B\ Do nothing, drag all of the tables into the designer and use them     - Fun to start with, but then you find examples like the address above where I know there is only two types of addresses, and I do not want to have to do array based coding in my html (i.e. if Locator.Count 0 then... If locator.Count 1 then) C\ I really want to convert the Locator/Address into a MainAddress PostalAddress 'table' and directly access those objects.  So I created 2 views MainAddress, PostalAddress, draged them to my design surface, gave the views a primary key, and an assossiation - so far so good... Unfortunatly then when I tried to change the relationship to a OneToOne I was not allowed! - after some tinkering with properties I eventually got that to work, but this is still not ideal. So my question is:  Is there a better way?

    DB:2.50:How To Create Business Entites For A Normalized Database 7f

    Hi,But I did not find the 'Customers' and 'Orders' in your post. just one entity ,locator, I think it's a good choice to put it into one table.Is there any reason why you split it into two?HarryPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

  • RELEVANCY SCORE 2.50

    DB:2.50:Linq Queries Against Extended Linq To Sql Objects df


    For a project I am currently working on, I have a DB that has a user record with a minimal set of data about the user, specifically an NT ID and a couple application specific attributes.  I generate Linq to Sql classes, and then created a partial class to extend the User with attributes retrieved from Active Directory at runtime.  In another piece of the application I have complex LINQ queries being created using the Dynamic Linq library from the MS examples.  I want these Active Directory populated properties to also be available to query, but whenever I include one of them and execute the query against a linq table I receive an error stating that the property has no supported translation to SQL.  I was hoping that linq to sql would automagically execute the select conditions that map to DB columns in the DB, return a list of rows/objects, and then execute the remaining select conditions as it would against any other collection object.  Since this clearly does not happen, is there any way to work around this?  Keep in mind that the code executing the queries is designed to work with any IQueryable object, so it does not know the structure of my User object (except through the ElementType property), and it should not have to go looking for Linq to Sql attributes (since I would like it to be generic to all IQueryable types, not just Linq to SQL).  Also, please ignore the potentially horrifying performance implications of merging the data from AD at runtime.  Any suggestions?

    DB:2.50:Linq Queries Against Extended Linq To Sql Objects df

    Sorry it's taken a while to respond to these suggestions, but somehow my profile became disconnected from my MSDN account when I changed my e-mail address, so I couldn't access the forums properly. In any case, neither of these suggestions really works
    for what I am doing. I am trying to provide a dynamic query capability against an arbitrary IQueryable data source. I will not even know the element type until runtime (user selectable), so I do not have any way of determining how to split the
    query apart without pre-processing the entire query expression tree. Obviously, moving the query code into the data access layer would defeat the goal of dynamic queries. I guess this is just a limitation of LINQ to SQL.

    Is there a Mark as not the answer button anywhere? Neither of the proposed solutions actually answered the criteria of the question I asked.

  • RELEVANCY SCORE 2.50

    DB:2.50:Scene Editor Problem - Unable To Move Objects jf



    Are you sure that you are not trying to do that in the Game view, instead of the Scene? In the Scene window a simple ALT + mouse drag will rotate your view around current point.

  • RELEVANCY SCORE 2.50

    DB:2.50:Passing Data Linq Objects Between Threads z3


    Hello,

    DB:2.50:Passing Data Linq Objects Between Threads z3

    You can eager-load (auto-expand) the queue items using the DataLoadOptions property on the DataContext object.

  • RELEVANCY SCORE 2.50

    DB:2.50:Xcelsius 2008 - Can't Drag Objects Into "Tab Set" Tabs xs



    Yesterday I was able to drag new objects into the first and second tabs of a Tab Set without any issues, but today after tweaking the Tab Set colors and adding a third tab, I can no longer drag objects into its tabs. When I drag an object into my work area from the Component Browser, the object appears but it is not shown (in the browser) as being inside any tab. When I try again to drag that same object in the Component Browser into a tab, it remains where it was, outside the tabs. When I drag any other random object that was already inside a tab, I can drag it out of the tab but not back in again, and not into another tab. No objects are grouped, locked or hidden. Something definitely feels very broken here.

    Yesterday, I experienced a massive setback when I found I was unable to even preview a preexisting 4.5 XLF project in 2008 ([see my other thread|Crashing at preview (migrating from 4.5 to 2008);). Not having received feedback on that issue (and anticipating a suggestion to waste time disabling many hundreds of legitimate objects one at a time to trace the problem), I thought I would attempt to recreate my project in 2008, but now this issue is stopping me dead in my tracks. Could this be a bad installation? Please help!

    DB:2.50:Xcelsius 2008 - Can't Drag Objects Into "Tab Set" Tabs xs


    Thanks for this replay, Andy.

    Have you given any consideration to placement of a pasted object? Xcelsius 4.5 placed the object adjacent to the object that was copied, whereas Xcelsius 2008 places them at the top left instead. With many UI panels open in the tool, this requires scrolling over and up to grab the object.

    Even then, more than half the time, the click does not "take" and dragging the object is virtually impossible. This has been a big nuisance for me. I suppose I can take the time to document this problem in greater detail at some point, but I'm incredibly busy trying to learn the new tool, migrate my projects over and handle other priorities at the moment.

  • RELEVANCY SCORE 2.50

    DB:2.50:Linq To Sql 7j


    After adding link to sql form under windows form project (this is my project name) then when i go to drag table from server explorer to OR Design form then the dragging operation is not performed that means i am unable to drag the table from server explorer
    to OR Design form under Visual Studio, So can u please suggest me how i can resolve this problem?

    S.K Nayak

    DB:2.50:Linq To Sql 7j

    Hi Surya,
    Did you have some error information?
    Somebody have met the same issue.
    I found a solution that helpedothers solve the dragging table onto .dbml designer view in Visual Studio.
    Please have a look below links.
    Why doesn't OR designer let me drag tables to design surface?
    http://stackoverflow.com/questions/17507592/why-doesnt-or-designer-let-me-drag-tables-to-design-surface
    Visual Studio Database Tools Error
    http://social.msdn.microsoft.com/Forums/zh-CN/d65c71f5-3887-4f2a-bbd3-e799a4ac6fdc/visual-studio-database-tools-error?forum=vstsdb

    Have a nice day!
    Kristin

  • RELEVANCY SCORE 2.50

    DB:2.50:Using Linq To Sql With Linked Server And Jet Oledb Provider 7m


    I have a Linked Server (in SQL Server 2005) pointing to a MS Access database.  Everything works fine using the SqlConnection/SqlCommand objects with a query like SELECT * FROM linked_server...table_name.
     
    But when I try to use Linq to SQL with the DataContext object and mapping attributes on my class like [Table(Name = linked_server...table_name)], I get an A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog or schema error.
     
    I am using Orcas Beta 1 (with C#).  Are Linked Server objects not supported with Linq to Sql?  Is the Microsoft.JET.OleDb.4.0 provider not supported?  Is there another way to reference a Linked Server?
     
    Looking for any suggestions on using Linq on an Access database...
     
    Thanks,
     
    Brad

    DB:2.50:Using Linq To Sql With Linked Server And Jet Oledb Provider 7m

    If it is a bug, do I need to report it?  If so, what is the best method of doing so?
     
    Thanks for the response,
     
    Brad

  • RELEVANCY SCORE 2.50

    DB:2.50:Regarding Linq And Frequent Database Changes fa


    Hi,I’m not sure if this is the right place to ask these questions but it looks like it's relevant.Basically we have a CRM solution today, called CRM.BIZ (www.crm.biz), which is made in Perl and the Dojo framework. We have decided to move to C# and .NET 3.5 and also using the Telerik (www.telerik.com) components to substitute the Dojo framework. The reason for this is that we want to move away from open source because Dojo is poorly maintained and has a lot of bugs. Perl is also an outdated scripting language that doesn’t quite cut it anymore.Our current architecture is that we have one database for each of our customers. This database contains Accounts, Contacts, Products, Orders, Tasks, Leads, Opportunities etc, all the ‘main’ modules for a usual CRM system.However, our challenge is that we want to use LINQ, because we find it very powerful and it seems to speed up the development process very much. Normally using LINQ wouldn’t be a problem, but a feature in our system is a ‘field generator’, which let the users add/remove database fields from e.g. the Accounts table. The users do this using a web interface with drag/drop of fields. As you can see, the problem is that our DataContext objects will not be updated if a field is added/removed/changed and hence the code might throw an sqlexception . We would also like the grid to be able to pick up the changes in the database eg from the LinqDataSource.As a solution we have considered to recompile the DataContext every time a field is added/removed but that solution would require thousands of recompilations which are not preferable or very smart.We’ve had a look at SQLMetal but can’t quite seem to find a way to do this, we’re thinking about having maybe an XML file with ‘custom’ fields that can be changed automatically, but how would this be reflected in the Datacontext? Or is it even possible?Are we going in the totally wrong direction or do you have a solution we could use? We are also open for totally different approaches. The main thing is that we need to be able to add/remove fields from the database during runtime.Thank you for your time.Best regardsKjartan Andreassen

    DB:2.50:Regarding Linq And Frequent Database Changes fa

    External mapping may work, if you can accept that your database mapping will be consistantly re-generated by your system, and can figure out how to access them afterwards (the linked page does not make that part very clear, but I imagine that Microsoft has something better that using reflection to determine the properties of the object).
     
    If you look at the situation, however, I think LINQ to SQL is a poor solution to the problem. LINQ to SQL is an Active Record pattern implimentation (see Martin Fowler's Patterns of Enterprise Application Architecture) which basically says that all tables are objects, rows are instances, and columns are properties. This makes great sense if you know what all your properties are at compile time, since you are then able to deal with all of the data in memory and in a typesafe manner. Cool enough. But when your database changes rapidly all the time, this may not be the best way to go.
     
    You may be better off using something like LINQ to entities, or maybe even creating your own LINQ provider, but ActiveRecord may not necessarily fit your problem, and trying to make it fit where it should not will probably result in excessive hackery and poor code, as is the case with all missapplied patterns.
     //Matt

  • RELEVANCY SCORE 2.50

    DB:2.50:How I Solve This Linq Problem? mj


    hi friends,
    now i m using vs2008 c#.net and linq to sql2005.i have two tables head table and detail table.
    i set auto identity to primary key of head table.my problem is i want to save list of head table

    and detail table in one submit changes.how i get that identity key of head table to insert

    in detail table as foriegn key?
    for eg.

    private void saveMethod(listhead headlist)
    {
    for(int=0;iheadlist.count;i)
    {
    ///Insert Head
    tblhead.name = test1;
    tblhead.address = city1
    ///Insert Det
    for(int j=0;jheadtable.detail.count;j)
    {
    tbldet.head_ID = ?????
    }
    }
    Conext.SubmitChanges();
    }
    Is there any quite difference between each submitchanges for one object and only one submitchanges

    for all objects?Please guide me.

    Regards
    David

    DB:2.50:How I Solve This Linq Problem? mj

    sorry for late reply,it worked perfectely.
    thanks Hadi
    Aung

  • RELEVANCY SCORE 2.50

    DB:2.50:Update The .Dbml File, When The Table Schemas Change In Database m7


    I am using Linq To Sql in my project. I am adding columns in database table through Stored Procedure, in asp.net using c#. Can anyone tell me, how can I update the .dbml file of LINQ in asp.net, because after drag and drop the .dbml file from database,
    the .dbml file is not updating when I am adding the column in my table. Thank you.

    DB:2.50:Update The .Dbml File, When The Table Schemas Change In Database m7

    Delete the modified tables from the dbml designer, and drag them back onto the designer surface from the Database Explorer.You have to:
    a. Refresh the database schema in the Database Explorer (right-click, refresh)
    b. Save the designer after deleting the tables
    c. Save again after dragging the tables back.Lingaraj Mishra

  • RELEVANCY SCORE 2.50

    DB:2.50:Drag N Drop????? mj


    Can i implement drag n drop technology between two tables. I want to drop a string vlue from one table and drop it on second table. I did it between two lists but i am unable to do between tables. is it possible. Also can anyone let me know good online tutorials and books on Drag N Drop Technology..Thanks Much in advance

    DB:2.50:Drag N Drop????? mj

    You'll get a quicker answer if you post this question to the Swing forum.

  • RELEVANCY SCORE 2.50

    DB:2.50:Linq Free-Contex Grammar kj


    this is a project that we are starting and I need to know as context-free grammar for linq, exactly the objects and linq query select, do it in ANTLR's description in linq queries. someone could help me?

    DB:2.50:Linq Free-Contex Grammar kj

    este es un proyecto que estamos comenzando y necesitamos saber como se crea lagramáticalibre de contexto para linq, exactamente la de los objetos y las consultas en linq, mejor dicho, hacer en ANTLR ladescripciónde las consultas
    en linq. alguien mepodríaayudar?

  • RELEVANCY SCORE 2.50

    DB:2.50:[Linq To Objects] Strage Behaviour In Where Clause dz


    Hy there
    I have the following LINQ query:

    Dim pageRows = From ts As ForemanTimesheet In foremanTimesheets Where (ts.Project = selectedProject) And (ts.TSDate = dtSelectedProjectDate) _

    DB:2.50:[Linq To Objects] Strage Behaviour In Where Clause dz

    Damn, lost track of this topic. Sorry I didn't respond. I also think I lost the error 'cause I haven't been working on that project for more then a month...

  • RELEVANCY SCORE 2.50

    DB:2.50:Silent Failure When Association Does Not Involve Primary Keys mm


     
    Hey folks.
     
    I have two tables.
     
    The parent has a identity, and a varchar(30) column entitled Code.
     
    The child entity has a relationship with the parent through the Code column.
     
     
    Through triggers and stored procedures, the code column gets converted into a combination of a static prefix, and the identity value. The code column is indexed(unique) and is not nullable.
     
    When I drag the tables into the LINQ Designer, the Association is shown graphically.
     
    When I compile and run my LINQ application, the parent entity can fetch child entities without throwing an exception.
     
    However, I receive an Invalid Cast LINQ error when setting the Code column in the child table.
     
    If I make Code nullable, or remove the relationship/association. I do not get this error.
     
     
     
     

    DB:2.50:Silent Failure When Association Does Not Involve Primary Keys mm

    Hi,
     
    I am also facing the same scenario as you. Did u find solution for this?
     
    I am getting the InvalidCastException when i try to change and update the child records in Grid.
     
    Exception Details: InvalidCast Exception
     
    Stack Trace:
     
       at LINQToolkit.Form1.btnSave_Click(Object sender, EventArgs e) in D:\Syed\LINQToolkit\LINQToolkit\Form1.vb:line 33   at System.Windows.Forms.Control.OnClick(EventArgs e)   at Janus.Windows.EditControls.UIButton.OnClick(EventArgs e)   at System.Windows.Forms.Control.WmMouseUp(Message m, MouseButtons button, Int32 clicks)   at System.Windows.Forms.Control.WndProc(Message m)   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message m)   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message m)   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG msg)   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)   at System.Windows.Forms.Application.Run(ApplicationContext context)   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)   at LINQToolkit.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)   at System.Threading.ThreadHelper.ThreadStart()
     

  • RELEVANCY SCORE 2.50

    DB:2.50:Move Objects With Drag And Drop Objects With Multi Touch z7


    HI there,

  • RELEVANCY SCORE 2.50

    DB:2.50:Regarding Linq And Frequent Database Changes p9


    Hi,I’m not sure if this is the right place to ask these questions but it looks like it's relevant.Basically we have a CRM solution today, called CRM.BIZ (www.crm.biz), which is made in Perl and the Dojo framework. We have decided to move to C# and .NET 3.5 and also using the Telerik (www.telerik.com) components to substitute the Dojo framework. The reason for this is that we want to move away from open source because Dojo is poorly maintained and has a lot of bugs. Perl is also an outdated scripting language that doesn’t quite cut it anymore.Our current architecture is that we have one database for each of our customers. This database contains Accounts, Contacts, Products, Orders, Tasks, Leads, Opportunities etc, all the ‘main’ modules for a usual CRM system.However, our challenge is that we want to use LINQ, because we find it very powerful and it seems to speed up the development process very much. Normally using LINQ wouldn’t be a problem, but a feature in our system is a ‘field generator’, which let the users add/remove database fields from e.g. the Accounts table. The users do this using a web interface with drag/drop of fields. As you can see, the problem is that our DataContext objects will not be updated if a field is added/removed/changed and hence the code might throw an sqlexception . We would also like the grid to be able to pick up the changes in the database eg from the LinqDataSource.As a solution we have considered to recompile the DataContext every time a field is added/removed but that solution would require thousands of recompilations which are not preferable or very smart.We’ve had a look at SQLMetal but can’t quite seem to find a way to do this, we’re thinking about having maybe an XML file with ‘custom’ fields that can be changed automatically, but how would this be reflected in the Datacontext? Or is it even possible?Are we going in the totally wrong direction or do you have a solution we could use? We are also open for totally different approaches. The main thing is that we need to be able to add/remove fields from the database during runtime.Thank you for your time.Best regardsKjartan Andreassen

    DB:2.50:Regarding Linq And Frequent Database Changes p9

     
    well, the two table pattern would be great, but you can't map it like that because that would 'join' columns. But you have rows.
     
    although dirty, I would use the 'universal table' approach that I described.
     

  • RELEVANCY SCORE 2.50

    DB:2.50:Newbie Problems Using Linq To Sql 88


    I've created a very simple database in VisualStudio Express 2010 using Data | Add New Data Source... | Database | Dataset | New Connection, with the data source set to Microsoft SQL Server 3.5 (.NET Framework Data Provider for Microsoft SQL Server Compact
    3.5), and populated it with a simple table. Then in my project I add item LINQ to SQL classes and give it a name. But when I drag the table to the LINQ to SQL design page I get an error The selected object(s) use an unsupported data provider.
    Clicking help tells me Only data connections that use the .NET Framework Data Provider for SQL Server are supported, but that
    iswhat I'm using. Where am I going wrong?

    DB:2.50:Newbie Problems Using Linq To Sql 88

    The designer is not supported when using LINQ to SQL with Microsoft SQL ServerCompact. You can use the sqlmetal.exe command line utility instead.
    See following articles for more information
    http://blogs.msdn.com/sqlservercompact/archive/2007/08/21/linq-with-sql-server-compact-a-ka-dlinq-over-sql-ce.aspx

    http://pietschsoft.com/post/2009/01/Using-LINQ-to-SQL-with-SQL-Server-Compact-Edition.aspx
    http://www.codeproject.com/KB/linq/Compact_LINQ.aspxGaurav Khanna

  • RELEVANCY SCORE 2.50

    DB:2.50:Using Layout Container 9s



    Hi,

    Can anyone tell me steps for using layout container after drag n drop of layout contained i am unable to arrange chat and analysis table over the Layout container.

    Thanks Aman

    DB:2.50:Using Layout Container 9s


    problem solved using validate icon in menu

  • RELEVANCY SCORE 2.50

    DB:2.50:I Cant Use The Table Attribute fc


    HiI've just installed the latest beta of Visual C# Orcas. I'm trying to use Linq. It works fine with simple arrays of objects, and now I would like to use it with a relational database.I've defined a simple table in the database (a .sdf file) and the appropriate class to go with. So I have to use the [Table(Name=Tablename)] attribute over my class. But it makes a compile-time error : the Table attribute is not known. What's wrong? In which namespace is this attribute class?Thanks

    DB:2.50:I Cant Use The Table Attribute fc

    SQL CE Support is not available in beta 1.

  • RELEVANCY SCORE 2.49

    DB:2.49:How To Stop Regenerating Entities, After Seperating From The Dbml Designer? fs


    I added couple of table and stored procedures to LINQ to SQL designer( on to dbml designer). afte that I seperated all table entities from the designer.cs file and made seperate folder for that and refering them in designer.cs file. So If I drag and drop any other stored procedure or table on to designer, I am getting all other tables and stored procedures those I seperated from designer.cs file.How can I stop that? I don't want to regenerating every time.

    DB:2.49:How To Stop Regenerating Entities, After Seperating From The Dbml Designer? fs

    If your goal in separating the items is to keep the file small I don't think there is a workaround for that. We don't recommend modifying the generated code for exactly the reason you ran into -- the designers continually update the code as you make changes. You could have multiple DBML files with a smaller set of entities in each one but that will only work if the entities are not related to each other since the designer builds a separate DataContext for each DBML file that only knows about the objects in that particular diagram.
     
    Out of curiosity, why do you want to keep the file small? Are you seeing a specific issue?
     

  • RELEVANCY SCORE 2.49

    DB:2.49:Linq With Two Table fj


  • RELEVANCY SCORE 2.49

    DB:2.49:Linq To Entities And Mixed Case Pks dz


    I have a varchar PK-FK relationship between two tables. In the PurchaseOrder table, the PK value for record A is all lowercase(xax83205). In the child Shipments table, of the ten related records, four have a FK value that's all lowercase (xax83205) and six
    are all uppercase (XAX83205). When I execute the LINQ to Entities statement:
    var products = container.Products.FirstOrDefault(p = p.PurchaseOrderNumber = XAX83205)
    I only get back shipment objects where the FK value is all lowercase, the same as the case of the PK in the Products table. The records that are uppercase are excluded. Collation on the database (and the PK-FK columns) is set to case insensitive (SQL_Latin1_General_CP1_CI_AS).
    1. How is it that case sensitivity is enforced in the LINQ to Entities execution?
    2. What can I change to ensure the query returns all Shipment (child) records regardless of case?
    Thanks in advance.
    Robert

    DB:2.49:Linq To Entities And Mixed Case Pks dz

    Hello,
    Did you have a try to use Enumerable.Contains method to filter the data source?
    http://msdn.microsoft.com/en-us/library/bb352880.aspx
    Thanks,Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • RELEVANCY SCORE 2.49

    DB:2.49:Serialization And De-Serialization Of C# Objects Using Linq (To Xml) To Sql Datbase. 3x


    New to linq and sql
    I am looking for complete tutorial sample app that does any or all of the following options:

    Example:
    Class Parent_A{ … }
    Class Parent_B{ ..}
    Class Parent_C{ ..}
    …. and so on...

    Derived classes: of Parent_A
    child_A1:Parent_A { … }
    child_A2:Parent_A { … }
    …... to n-th child class like so: child_An:Parent_A { … }
    n = 1, 2, …

    Derived classes: of Parent_B
    child_B1:Parent_B { … }
    child_B2:Parent_B { … }
    …... to m-th child class like so: child_Bm:Parent_B { … }
    m = 1, 2....

    Option#1:
    I like to dynamically create with C# and using linq, a database that can store all C# objects ( .NET ) as XML into ONLY ONE column of one table in database. Then de-serialize back to original stored object instance type via linq.
    All this time, letting linq automatically create XML translation of public properties before sending it to database.

    I think it is not possible to use a single column for serializing multiple (not similar) class types because linq is strongly typed. So each column must be assigned to a given class type for serialization and

    deserialization.

    But if you have a solution, please advice.
    And if possible, provide links of where to look.
    Thank you.

    Option#2:
    Want to save C# objects to dynamically created database using linq.
    Let linq serialize objects as XML automatically.
    Then also let linq de-serialize from database and create same object instance like so:

    a) For each child object, e.g. child_A1... child_An to child_B1 to child_Bm... and so on, I can create a table, and store all same object ( note: child_A1 class type is NOT same as child_A2 class type despite same inheritance from
    Parent_A ).

    In this case, I can store like so:

    Table name: Child_A1_Table
    Columns and sample contents:
    Number Object Instance
    1 child_A1_object_Number_1 ( in XML )
    2 child_A1_object_Number_2 ( in XML )
    3 child_A1_object_Number_3 ( in XML )
    ….
    i child_A1_object_Number_i ( in XML )

    Table name: Child_B4_Table
    Columns and sample contents:
    Number Object Instance
    1 child_B4_object_Number_1 ( in XML )
    2 child_B4_object_Number_2 ( in XML )
    3 child_B4_object_Number_3 ( in XML )
    ….
    j child_B4_object_Number_j ( in XML )

    Obviously, I can have one large table and multiple columns where each column is assigned to a given class type.

    If there are sample tutorial codes out there, please provide links.
    I have been looking, but most searches results are not so useful so far.
    Thank you for your time.

    DB:2.49:Serialization And De-Serialization Of C# Objects Using Linq (To Xml) To Sql Datbase. 3x

    I don't think that you can find exact tutorial for your task, but I can help you with serialization methods:
    public static XElement ToXElementT(this object obj)
    {
    using (var memoryStream = new MemoryStream())
    {
    using (TextWriter streamWriter = new StreamWriter(memoryStream))
    {
    var xmlSerializer = new XmlSerializer(typeof(T));
    xmlSerializer.Serialize(streamWriter, obj);
    return XElement.Parse(Encoding.ASCII.GetString(memoryStream.ToArray()));
    }
    }
    }

    public static T FromXElementT(this XElement xElement)
    {
    using (var memoryStream = new MemoryStream(Encoding.ASCII.GetBytes(xElement.ToString())))
    {
    var xmlSerializer = new XmlSerializer(typeof(T));
    return (T)xmlSerializer.Deserialize(memoryStream);
    }
    }

    XElement element = myClass.ToXElementMyClass();
    var newMyClass = element.FromXElementMyClass();

    This extension methods can help you serialize and deserialize objects using XElement
    Please mark as reply if helped.
    Also visit my blog http://msguy.net/

  • RELEVANCY SCORE 2.49

    DB:2.49:Unable To Drag And Scroll At The Same Time 9x


    original title: trying to drag and scroll on a page to get item where it needs to go, but I can't scroll and drag at the same time
    in certain apps I need to be able to drag and scroll at the same time to move objects, but since I got this new HP desktop with windows 7 I cant do this, never had a problem with this with windows xp

    DB:2.49:Unable To Drag And Scroll At The Same Time 9x

    Hi,

    Step 1: Check if those games are compatible with Windows 7. Use Windows 7 compatibility center to check that:http://www.microsoft.com/windows/compatibility/windows-7/en-us/

    Diana
    Microsoft Answers Support Engineer
    Visit ourMicrosoft Answers Feedback Forum and let us know what
    you think.

    If this post helps to resolve your issue, please click the "Mark as Answer" or "Helpful" button at the top of this message. By marking a post as Answered, or Helpful you help others find the answer faster.

  • RELEVANCY SCORE 2.48

    DB:2.48:Linq - How Is It Different Than Inline Sql? 11


    I know it's objects you are dealing with and has some nice features that saves coding, but doesn't this violate sound design idioms?   It looks to me like OO version of inline SQL, that's it.  If my table structure changes or datatype changes, you have to regen your LINQ objects, recompile, redeploy; where as with a stored procedure, you may not have to do anything.   What am i missing?

    DB:2.48:Linq - How Is It Different Than Inline Sql? 11

    That is correct - you will need to deploy a new SSDL file and change the connection string that your app uses, but given that, your LINQ application should work.
     
    There are of course restrictions, e.g. if you move from one system to another that supports a subset of the original system's functions or datatypes, then your application may need some reworking.

  • RELEVANCY SCORE 2.48

    DB:2.48:Scene Editor Problem - Unable To Move Objects 7k



    Are you sure that you are not trying to do that in the Game view, instead of the Scene? In the Scene window a simple ALT + mouse drag will rotate your view around current point.

  • RELEVANCY SCORE 2.48

    DB:2.48:Including Only Specific Properties In Linq-To-Sql Joins 98


    I'm running the following query which is joing the Task table to the User table:
    DataLoadOptions options = new DataLoadOptions();
    options.LoadWithTask(o = o.User);
    Domain.LoadOptions = options;

    IQueryableTask query =
    from o in Domain.Tasks
    select o;
    This of course eagerly loads all Tasks and all joined Users.    How can I join only a single property, such as User.Username?I've tried options.LoadWithTask(o = o.User.Username); But this throws an exception.  I also need to make sure the query returns Task objects though instead of anonymous objects.

    DB:2.48:Including Only Specific Properties In Linq-To-Sql Joins 98


    Hello Jonathan,

    If the Task.User.UserName is finally what you want to include, I suggest you

    convert the IQueryable query into one IEnumerable one and then make the multiple-line lambda expression when all the joins have been performed.
    However, if you want the UserName to be the JOIN condition in the LINQ queries, I think we can directly use it like (join on task.User.UserName equals ).

    Because the multiple-line lambda expression is not support in the IQueryable LINQ to SQL query, we need to load the entities into memory (IEnumerable collection).
    Actually, its effect is the same as a foreach loop.

    If you have any questions, please be free to tell me.

    Have a nice weekend!

    Best Regards,
    Lingzhi Sun

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

    Thanks for your effort! It helps me out of the problem.

  • RELEVANCY SCORE 2.48

    DB:2.48:How To Do Linq To Sql When Im Have To Pass Command Text Through Custom Method f9


    In my group, we pass all SQL queries (we're talking about read only SQL statements here) through a custom method. At first glance, it seems that I can't use Linq because of this. I'm wondering if it's possible however to write a new Linq provider that would
    work. I know that Linq to SQL builds up an appropriate SQL statement from the Linq query specified and then submits that to the SQL server; is there any way I can intercept this command text and submit it to my groups custom method? Is there another way to
    do this?
    I have created a Widgets object which selects the entire table and then of course I can put that into a List and use Linq to Objects, but that's always selecting the whole Widget table, so the performance is going to be awful.
    Any ideas? Thanks

    DB:2.48:How To Do Linq To Sql When Im Have To Pass Command Text Through Custom Method f9

    I need some help with the concept of wrapping the connection. In this case it would be an OracleConnection. What it the custom connection would I override to submit all select queries to another method? An example would be helpful. Thanks in advance.

    Are you using Linq-to-SQL, Linq-to-Entities/EF or something else? L2S doesn't support oracle so I'm guessing you're using L2E/EF..?
    If you're using EF, check out Jarek Kowalski's provider wrapper samples:
    http://blogs.msdn.com/b/jkowalski/archive/2009/06/11/tracing-and-caching-in-entity-framework-available-on-msdn-code-gallery.aspx
    (Which by the way contains some generic wrapper code for connections and commands, so can be used for other connection/command wrapper scenarios as well)

    Cool tools for Linq-to-SQL and Entity Framework 4:
    huagati.com/dbmltools -
    Rule based class and property naming, Compare and Sync model = DB, Sync SSDL = CSDL (EF4)
    huagati.com/L2SProfiler -
    Query profiler for Linq-to-SQL and Entity Framework v4

  • RELEVANCY SCORE 2.48

    DB:2.48:Drag &Amp; Drop In Swing 9s


    I am trying to build a JTable subclass that enables the user to drag entries around the table and drop them in cells of the same table. Unfortunately, I cannot make much sense of the tutorials regarding drag drop in jdk 1.4 and JTables.
    The table contains Objects that have fields like a name and a comment. What kind of TransferHandler do I have to install, what classes do I have to extend?

    DB:2.48:Drag &Amp; Drop In Swing 9s

    the problem you reported seems to be unchanged as of jdk 1.4.1_01. also, dnd crashes on some winnt machines and xservers :-(
    on winnt, at least, it seems to be a system internal problem rather than a problem with the jvm

  • RELEVANCY SCORE 2.48

    DB:2.48:Drag And Drop Interaction Wizard 77



    I am having problems with the Drag and Drop Interaction Wizard. I am using Captivate (6.1) and when I launch the wizard I am able to select the drag objects and drop targets, but when I get to Step 3 (mapping), I am unable to map the drag sources to the drop targets. When I double click on the drag source and draw the arrow to the drop target, the arrow disappears.

    Has anyone else had this problem? If so, what did you do about it?

    DB:2.48:Drag And Drop Interaction Wizard 77


    Hi,

    You do not want to double click on the object in Step 3. All you need to do to map the source to destination, on the Green Items you would notice a '+' symbol, drag and put them on the drop item, you would able to map them easily that way, double clicking them would deselect the object.

    For more clarification, what this video tutorial --

    http://www.youtube.com/watch?v=ILtUftHxmag

    Thanks,

    Anjaneai

  • RELEVANCY SCORE 2.48

    DB:2.48:How To Do This With Linq? 83


     I have a few different phone number tables such as companyphone, affiliatephone, userphone.  I'd like to create a method that would take a linq table (like companyphones) and return a collection of phone objects from it so that I don't have to have a separate getphones method for each class (company, affiliate, user, etc.).  I'm unclear on how to do this though.  Can someone give me an example?  Thanks.

    DB:2.48:How To Do This With Linq? 83

    I'm trying to figure out how to use this and I've tried a number of variations but I can't get any of them to work.  In my dataaccess class I have the expression...
     

    Code Snippet

  • RELEVANCY SCORE 2.48

    DB:2.48:Linq To Sql Table Doesnt Have Primary Key jf


     
    Hi,
     
    I am working with Linq to Sql . I want to do insert,update, delete operations with the table which doesn't have primary key.
    but i am unable to do this ,i am getting following error...
     
    Can't perform Create, Update or Delete operations on 'Table(test)' because it has no primary key.
     
    Is any one can help me to do operations for the table does't have primary key.
     
    Thanks
    Shiva

    DB:2.48:Linq To Sql Table Doesnt Have Primary Key jf


    Setting primary key after creating DBML file in SQL database is not sufficient, You need to refresh DBML or Re-Create the DBML file.

  • RELEVANCY SCORE 2.47

    DB:2.47:Serialize Linq Objects To Sql Server Session State 83


    I'm attempting to use SQL Server-based ASP Session state to store a linq DB object that has nested EntitySets representing realted tables/objects.  I want to store the object and its children in the session.  When using SQL server for session state, ASP uses binary serialization for storage.  I can use [ISerializable] to store the table object itself, but the relationships are a problem because the table object represents the related DB objects as EntitySets, which are not binary-serializable.  As a result, I cannot save to the session state.
     
    Suggestions on how I can do this?  How can I make my generated linq objects binary-serializable?  Can I overwrite the binary serialization of the objects or possibly use a surrogate?  Or can I tell the session state to use DataContractSerializer instead of the BinaryFormatter?
     
    Thanks,Anthony

    DB:2.47:Serialize Linq Objects To Sql Server Session State 83

    I'm attempting to use SQL Server-based ASP Session state to store a linq DB object that has nested EntitySets representing realted tables/objects.  I want to store the object and its children in the session.  When using SQL server for session state, ASP uses binary serialization for storage.  I can use [ISerializable] to store the table object itself, but the relationships are a problem because the table object represents the related DB objects as EntitySets, which are not binary-serializable.  As a result, I cannot save to the session state.
     
    Suggestions on how I can do this?  How can I make my generated linq objects binary-serializable?  Can I overwrite the binary serialization of the objects or possibly use a surrogate?  Or can I tell the session state to use DataContractSerializer instead of the BinaryFormatter?
     
    Thanks,Anthony

  • RELEVANCY SCORE 2.47

    DB:2.47:Modify List Using Linq To Objects kx


    Hello!

    DB:2.47:Modify List Using Linq To Objects kx

    Well, there's some gotcha's:
     
    You have to enumerate the query and ignore the result.
    You have to use a mutable reference type.
      string is immutable.
      int is a value type (these don't work because they are copied into the parameter of the anonymous method! and the modifications don't get copied back to the original.)
     

    Code Snippet

  • RELEVANCY SCORE 2.47

    DB:2.47:Microsoft Acces Database And Linq c9


    I tried to connect to a mdb database but no succes. I made a Linq to SQL file. I also created a connection for my .mdb database file but when I drag a table from SERVER EXPLORER to my_db.dbml I get this error: The selected object(s) use an unsuported data provider.How can I fix this?Thanks

    DB:2.47:Microsoft Acces Database And Linq c9

    Hi
     
    Linq to SQL only supports connecting to SQL Server editions (2000, 2005, MSDE, Express).
     
    To use Access you will need to upsize the database onto a sql server and run it from there.  Sadly there is no other way.  Unless you create your own Linq to Access provider....but that's not a simple task.
     
    Regards
     
    Ben

  • RELEVANCY SCORE 2.47

    DB:2.47:[Info] Linq - Beispiel-Abfragen | Linq - Sample Queries fc


    Hallo liebe Community,
    Auf dem folgenden Link gibt es ein Projekt dass etwa 101 Beispiele von jedem folgenden Bereiche enthlt:

    LINQ To Objects
    LINQ To SQL
    LINQ to DataSet
    LINQ to XML

    LINQ - Beispiel-Abfragen | LINQ - Sample Queries
    Fr mehrere Infos, bitte auch die folgenden Artikel lesen:

    Sprachintegrierte Abfrage (Language-Integrated Query, LINQ)
    LINQ to XML:
    http://msdn.microsoft.com/de-de/library/bb387098(VS.90).aspx LINQ to SQL:
    http://msdn.microsoft.com/de-de/library/bb386976(VS.90).aspx LINQ to Datasets:
    http://msdn.microsoft.com/de-de/library/bb386977(VS.90).aspx LINQ to Objects:
    http://msdn.microsoft.com/de-de/library/bb397919(VS.90).aspx
    Gre,
    Robert

    DB:2.47:[Info] Linq - Beispiel-Abfragen | Linq - Sample Queries fc

    Hallo liebe Community,
    Auf dem folgenden Link gibt es ein Projekt dass etwa 101 Beispiele von jedem folgenden Bereiche enthlt:

    LINQ To Objects
    LINQ To SQL
    LINQ to DataSet
    LINQ to XML

    LINQ - Beispiel-Abfragen | LINQ - Sample Queries
    Fr mehrere Infos, bitte auch die folgenden Artikel lesen:

    Sprachintegrierte Abfrage (Language-Integrated Query, LINQ)
    LINQ to XML:
    http://msdn.microsoft.com/de-de/library/bb387098(VS.90).aspx LINQ to SQL:
    http://msdn.microsoft.com/de-de/library/bb386976(VS.90).aspx LINQ to Datasets:
    http://msdn.microsoft.com/de-de/library/bb386977(VS.90).aspx LINQ to Objects:
    http://msdn.microsoft.com/de-de/library/bb397919(VS.90).aspx
    Gre,
    Robert