Is there a way to delete an entity by its EntityKey witout loading it?
Is there a way to delete an entity by its EntityKey witout loading it? ...
Is there a way to delete an entity by its EntityKey witout loading it? ...
Here is my XAML <Grid Name="grid"> <TextBlock Text="Some Label" /> <WindowsFormsHost Name="winFormsHost"> </WindowsFormsHost> </Grid> On the load of the form I execute the following method protected void OnLoad(object sender, RoutedEventArgs e) { // Create a line on the fly Line line = new Lin...
(If you want to close this thread for duplicate, I don’t think this question is redundant cause I’ve done my/some homework :) I know this subject has come up before :) . I’ll be learning C# and Windows Forms this summer so I’m starting to buy some books. I’ve decided to treat them separately and buy a book about each one. I spent the l...
I'm writing a small app that needs to be executed once a week. I could write it as a service that runs constantly but only executes the task that I need it to once a week, but that seems like overkill. Is there another way of executing an application once every x period of time? I'm looking for a solution that doesn't involve user inte...
I have written regexes for recognizing float and int but they don't seem to work (code below). { string sumstring = "12.098"; Regex flt = new Regex(@" ^[0-9]*(\.[0-9]*)"); Regex ent = new Regex("^[0-9]+"); if (d_type.IsMatch(sumstring)) { Console.WriteLine(sumstring + " " + "dtype"); } Match m = en...
I have an Array<string>. I have to take all elements from i to j. How can I make this using an extension method? ...
I have a enum containing the following (for example): UnitedKingdom, UnitedStates, France, Portugal In my code I use Country.UnitedKingdom but I want to have the value be UK if I assign it to a string for example. Is this possible? ...
In C#, how do I query a remote server for its current time? Similar functionality to net time \\servername but returning a datestamp that includes seconds. Thanks ...
I'm trying to use the Google Analytics Data API to get data filtered by country. I am using the .NET library at http://google-gdata.googlecode.com/svn/trunk/ which works beautifully as long as I don't try to filter by country. This works fine: const string dataFeedUrl = "https://www.google.com/analytics/feeds/data"; var query = new D...
Can anyone reccomend a free .NET libary which allows you to expose a SQL Query builder to your users in a windows form app? I'd like my users to be able to run relatively straight forward SELECT statements, including some JOINS and other multi-table operations without getting into the real nitty-gritty of SQL. Thanks, sweeney ...
I would like to print an image of a dialog, as if [alt][Print Scrn] were used. Does the framework allow for this to be done programmatically? ...
Hi, I'm trying to learn how to use the Entity framework but I've hit an issue I can't solve. What I'm doing is that I'm walking through a list of Movies that I have and inserts each one into a simple database. This is the code I'm using private void AddMovies(DirectoryInfo dir) { MovieEntities db = new MovieEntities(); foreach ...
I have to display a PDF inside a winform (c# on .net 2.0 framework). For now, I am using the ActiveX PDF control provided by Adobe. I have to disable the entire control so that a user can't print or save via right-click or hotkeys. Unfortunately, many of the documents need to be rotated (just viewed, not permanently saved that way). ...
My understanding is that you're typically supposed to use xor with GetHashCode() to produce an int to identify your data by its value (as opposed to by its reference). Here's a simple example: class Foo { int m_a; int m_b; public int A { get { return m_a; } set { m_a = value; } } public int B ...
ok, so I'm writing a duplicate logon "worker" class in C# and I've ran into a bit of a snag. My logic behind it, I thought, was flawless! :( But, I can't for the life of me figure out why it's triggering on the first occurence rather than on just duplicates :( namespace Lab.Core.BackgroundWorker { using Lab.Core; using Lab.Core...
I'm working with an ActiveX control placed on a winform. I'd when the user tries to save or print, it will always show a dialog box first; I'd like to either immediately close the dialog box or keep it from displaying in the first place. The control in question does not raise any events that would let me know what button they pushed, ...
There are tons of Google examples on making a POP3 client in .net but I want to make a simple custom POP3 service/server to retrieve email for the user from a custom database. Are there any components or examples of that? ...
I have this XML file, and I want to deserialize it to an object. But I don't want to type its class definition. There is any tool that can create the C# code of the class for me, inferring the data types from sample data? ...
I have a list of files with their names in a listbox and their contents stored in an SQL table and want the user of my app to be able to select one or more of the filenames in the listbox and drag them to the desktop, yielding the actual files on the desktop. I can't find any documentation on how to do this. Can anyone explain or point...
I have a list of multiple string and I need to do operation on them by the suffixe they have. The only thing that is not changing is the beginning of the string (They will be always ManifestXXX.txt, FileNameItems1XXX...). The string end's with a suffix is different everytime. Here is what I have so far (Linq Pad): var filesName = new[] ...