|
|
what is cookie.discard? and how to use?
anybody know please tell me.
|
|
|
|
|
Here[^] you go. There's lots of information available there.
|
|
|
|
|
how to pass data from gridview page to another page textbox in asp.net with C#
|
|
|
|
|
Store it in the Session, or a Cookie and retrieve it in the Load event for the new page.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Hello everyone,
I've been working on a C# project with WPF client, WCF server and Entity Framework 6 to get database access. I use an entity-object to communicate between server and client. Due to this the entity is detached from entity framework cache manager when transferred to the client. If there is an update the client calls a server facade through service references and sends the updated entity. Since it's detached a simple dbContext.SaveChanges() on server-side doesn't work, so I set
dbContext.Entry( project ).State = EntityState.Modified;
dbContext.SaveChanges();
where 'project' is my entity I want to update. This works fine on the entity itself but I need a solution to update the entity and all corresponding entities held within this entity - a recursive update.
To make it more clear have a look on the ERM. Project holds a Client and Building which are also entity-objects.
http://imageshack.com/a/img537/8806/y6Zzxt.png[^]
When I set the explicit state for each entity it works, but then again it's not as generic as I wish for. So the challange is to find a solution where I don't have to handle each property of my entity-object separately.
Currently I use the repository pattern as follows:
public abstract class PersistenceIntegrationService<T> : IPersistenceIntegrationService<T> where T : BaseEntity
{
...
public T Update( T entity )
{
if ( entity == null )
{
throw new ArgumentNullException( "entity" );
}
try
{
this.PreUpdate( entity );
this.AddModifyInformation( entity );
this.persistenceContext.SetModified( entity );
this.persistenceContext.SaveChanges();
this.PostUpdate( entity );
}
catch ( DbEntityValidationException e )
{
string message = this.PrettifyDbEntityValidationExceptionMessage( e );
throw new EntityValidationException( message, e );
}
return entity;
}
}
Although I have pre-persist-hooks I do not want to set the state explicitly, as mentioned earlier. I wonder if there is a built-in solution from entity framework. For my searches on the web I didn't find any hints regarding this challange.
I would appreciate any suggestion or idea.
modified 3-Aug-15 4:27am.
|
|
|
|
|
|
Many thanks for this article!
The problem described in the article is the same but the idea to solve it seems not to be as generic and simple as I would like to have it.
Currently I'm trying to override SaveChanges() and hope to get a solution with minimal or no difference in the usage compared to the Entity Framework built-in functions. Maybe I can use some parts of the approach from the article.
|
|
|
|
|
|
hi all!
I know that the only way to find the Separating Axis is the brute force. Is there a way to avoid this(it's true that a computer can calculate more than 10000000 dot products,with a fast result).
Seen that V-clip and gjk suck...
I was just wondring!!!
thanks!!!
|
|
|
|
|
You apparently answered your own question before you even got to the question mark.
Isawyouoo wrote: I know that the only way to find the Separating Axis is the brute force.
Isawyouoo wrote: Is there a way to avoid this
So, when you Googled "polygon collision detection algorithms", what did you come up with?
|
|
|
|
|
I came up always with the same arguments blablabla...
|
|
|
|
|
How to make a qr code encoder and decoder with c#. Not libiray file.
|
|
|
|
|
|
I would like track client mac address when he will brows my website.
|
|
|
|
|
Please don't cross-post - you have also posted in the java forum[^] - the correct location.
|
|
|
|
|
Hi C-Sharpers
I've been working on some C++/CLI 'glue' code to make it easier for C# devs to write plugins for ToDoList[^] (just importers/exporters for now because they're the simplest).
Now I need a C# guinea-pig to create a useful importer or exporter that can be included with 7.1.
I could do it myself but that would not be nearly as worthwhile in exercising the 'glue'. I've also got a sample C# project that provides a bare-bones plugin so it's really about taking that and making it genuinely useful.
If this is a success we can then move on to writing a sample C# Task View plugin which will be much more exciting!
If you are interested, you can find all the necessary code on GitHub[^].
|
|
|
|
|
I wonder why this was downvoted, maybe it should have been posted in the collaboration forum?
Anyhow have an upvote!
(Quite a big rear end opening sunshine too, considering the meager improvement my vote made.)
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
|
|
|
I had a look Manfred and it gets virtually no traffic so I'll leave my post here and accept the flak!
|
|
|
|
|
Good suggestion, Manfred! (upvoted)
|
|
|
|
|
Manfred R. Bihy wrote: posted in the collaboration forum Thx Manfred, I didn't know there was one.
|
|
|
|
|
hi
Does anyone have chart control Recommended for C# WinForm ?
free or Built-in
thanks
|
|
|
|