Using the Northwind schema as an example which collection interface would you use in the following circumstances.
.
Customer
Customer has a collection of Orders. For the purpose of this example the Orders collection is readonly.
Order
An Order has collection of OrderDetails. An OrderDetail can be added to the collection.
Employee
...
Hi, Should be a simple question. Using C#, all I want to do is just email to the email address associated to the default profile, how do I do this? I have the following code setup:
Outlook.Application oApp = new Outlook.Application();
Outlook._NameSpace oNameSpace = oApp.GetNamespace("MAPI");
Outlook.MAPIFolder o...
Hello everybody.
I would like to know how to download and save a file to my hard drive, specifically a zip file from a HTTP server using the System.Net.Socket.Sockets class.
I know there are allot easier ways to download a file with .Net, but i would like to know how to do it with Sockets, if possible of course although I'm pretty sure...
I'm developing an application that will need to communicate with itself running on different machines located in different locations. I was going to use TcpListener and TcpClient to send information between applications but then I came across MSMQ.
The computers are connected via software VPN, which communicates across my standard inte...
Hi I´m working on a project that uses Enterprice Libraries´s Unity container to resolve
dependencies for exception handling, cache, logging and db access but we keep getting a lot of leaked objects into memory.
We are using property injection like this:
[Dependency]
public Database DB
{
get { return db; }
set { db = value; }
}
[De...
I am working with a page that has a series of checkboxes that at least one box must be checked.
The validator fires when I click the submit button and if no checkboxes are checked indicates the validation has failed. However If I check one of the checkboxes the validation message does not go away until I click the submit button again. ...
EDIT seems my original post below might have been a bit long.
Simply said, can I spawn some AppDomains and ensure that they cannot communicate with one another in any way?
There is a competitive robotic soccer simulation league called RoboCup 3D. One of the fundamental rules is that all communication between agents be conducted thro...
This is what I have so far
using System;
using System.Collections.Generic;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Text;
namespace Firelight.Business
{
public interface IBaseEntity<K>
{
K Id { get; }
}
/// <summary>
/// Base business database connection object...
I am creating a web service in asp.net 2.0 with c# and have a web method which looks like this:
[WebMethod()]
public List<Comment> GetYourSayComments(int pageNumber, int pageSize, int commentTopicId)
{
CommentManager cm = new CommentManager();
return cm.GetYourSayComments(pageNumber, pageSize, commentTopicId, tr...
Short version: Can we read from dozens or hundreds of table partitions in a multi-threaded manner to increase performance by orders of magnitude?
Long version:
We're working on a system that is storing millions of rows in Azure table storage. We partition the data into small partitions, each one containing about 500 records, which repre...
I have a problem getting my change(s) to data object retrieved using NHibernate to persist back into the database. I get no exceptions so it's difficult to know where to look. Any suggestions?
string name = "somenewname";
string repositoryId = "somerepositoryid";
ISession nhbSession = GetNhbSession(session);
nhbSession.Transaction.Begi...
Hi Guys,
I have alluded to this issue in my other question, but i think it's worthwhile breaking it out into its own question, as it's not really dependant on the other scenarios i mentioned.
Anyways - onto the Q, don't know if this is possible. Looking for a solution/workaround.
I have a Class Library, with nothing but POCO's:
MyCom...
I asked a question recently regarding a http://stackoverflow.com/questions/3863657/peculiar-behavior-of-immediate-window-in-vs-2008 peculiar behavior that I observed in the immediate window. After some debugging I found the issue the following example can reproduce the same.
// SimpleClassLib.dll
namespace SimpleClassLib
{
...
I'm trying to programmatically download some PDF document with a C# windows form application. Right now, I've got far enough to get a unique URL for each page that goes to download the PDF.
Each link is a webpage that submits a form via POST as soon as the page is loaded
function window_onload() {
Form1.submit();
...
I have a client (and server) with 2 channels set up on different protocols, lets say X:// and Y://.
If I call a service (over remoting) from client (C) on a server (S) that needs to perform a callback to the client (so S->C) is there a way to specify which channel to use? In my use case I want any calls from X:// to callback over X:// ...
What is the benefit of keeping code behind 'clean'?
Many times I come across posts here about someone trying to do the equivalent in XAML instead of code behind. Their only reason being they want to keep their code behind 'clean'. Correct me if I am wrong, but is not the case that:
XAML is compiled too - into BAML - then at runtime h...
I have a application I'm currently working on and it includes a form that allows the user to register it. I have the information stored in a string and I would like that information emailed to my gmail account. I searched online and I was able to send it using my gmail account but not everyone has gmail and the code requires a password ...
I have a situation where I need to move some huge data using a timer job. But I can't do this using OneTimeSchedule as it may impact the performance of my sharepoint application during the peak hours.
I want to make it run for maximum of 5 hours a day starting at 20:00 everyday.
What is the best way?
...
I always thought that enough requirement that class should satisfy to be able to use Where() with it is to implement IEnumerable.
But today a friend of mine asked me a question, why he cannot apply Where() to the object of SPUserCollection class (it is from Sharepoint). Since this class is derived from SPBaseCollection which implements ...
Hi folks,
the following lambda statemement returns null, when i was hoping it would return a string value.
var countryCode = AddressComponents
.Where(x => x.AddressType == AddressType.Country)
.Select(x => x.ShortName)
.SingleOrDefault();
now the AddressType property of the current instance i'm interrigating contains the ...