C# - NHibernate - Default Implementation Of QueryOver Use Some Sort Of Caching When The Results Are Returned?

Dec 15, 2010

I am developing a windows forms smart client that uses Fluent Nhibernate 1.1 and NHibernate 3.0 for persistence. Due to legacy code I have had no option but to create a single session that handles all client level CRUD operations. This tends to leave the Nhibernate session in a stale state. So I have made the decision to use QueryOver to eliminate this stale data issue, as I was under the impression that query results were not cached. This doesn't seem to be the happening as the results returned from NHibernate seem to be cached. My question is does the default implementation of QueryOver use some sort of caching when the results are returned?

View 1 Replies


ADVERTISEMENT

How To Use QueryOver With NHibernate

Feb 7, 2012

how to use nHibernate with Vb.net using all the examples online(which are in C#) to learn. Which has been fine for the basics, but now I'm trying to learn how to use QueryOver's JoinAlias, and going from C# to VB.net is difficult. I've been using this page's answer as a reference, but I'm still having trouble converting an example like that to Vb.net.

View 1 Replies

IDE :: Interaction Of Finalize And Default Implementation Of IDisposable() Interface?

Apr 20, 2009

I am comparing an alternative Dispose pattern to VS2005's default implementation. In doing the comparison I have found several uncertainties with the default pattern which have raised a handful of questions related to sub-class implementations and object Finalization.

[Code]...

View 1 Replies

Class Serialization - No Results Returned

Jun 16, 2011

I have an error in the the following class, but am unsure where it is. The class will return correctly in my service but does not serialize and return any results.

Imports System
Imports System.Data.Objects
Imports System.Data.Objects.DataClasses
Imports System.Data.EntityClient
Imports System.ComponentModel
Imports System.Xml.Serialization
Imports System.Runtime.Serialization
[Code] .....

This will not be the final iteration of GetEmail, but I am using this in it's current state to try and figure out why I am not getting the class to serialize correctly.

View 1 Replies

Not All Results Returned From ADODB Connection?

Jun 1, 2010

We have had a visual basic.net (2002) service running on our server for several years now with no problems. However I recently needed to update one of the DB calls by adding additional fields to the SELECT statement. However, after adding the new fields, some of the returned data is coming back empty when I loop through the records. I have confirmed that the querystring is accurate and returns all of the data through a third party viewer, so I'm not sure what is going on.For example, in the code below, everything worked fine with field1, field2, and field3. However, when I add field4, data for field2 and field4 come back empty when looping through the results.

View 10 Replies

.net - NHIbernate NHibernate Attempts To Execute A Database Update During CreateQuery Execution?

Mar 10, 2010

Basically, I wish to fetch a filtered set of objects from the database (Oracle 9.2) based on the id property of the object PsalertsEvent. The code being executed is:

Public Overloads Function GetAll(ByVal laterThan As Long, ByVal filteredPsalertsEvents As IList) As IList Implements IPsalertsEventRepo.GetAll
'Get all psalerts events with an ID greater then the specified laterThan parameter
filteredPsalertsEvents = MyBase.NHibernateSession.CreateQuery("from PsalertsEvent p where p.id > " & laterThan).List

[Code]...

View 2 Replies

MS Entity Framework VS NHibernate And Its Derived Contribs (FluentNHibernate, Linq For NHibernate)?

Feb 4, 2010

I just read this article about the Entity Framework 4 (actually version 2).Entity Framework seems to offer a huge improvement over its first release. Thus, I have never ever used EF in any project, since I think EF is not mature enough in comparison to NHibernate.NHibernate and its current contributions of FluentNHibernate and Linq for NHibernate by Ayende RahienMy feeling is that Microsoft is solely trying to gain terrain it has lost in favor of NHibernate when the 2nd version of NHibernate came out.Nevertheless, my concerns are the followings (not in particular order):Will EF4 tend to be less XML-verbose?Will EF4 be compatible with other underlying datastore than just SQL Server?What are the greatest benefits of going with EF4 instead of FluentNHibernate or NHibernate itself.

NHibernate is a great tool, I guess everyone agrees. Due to its predecessor Hibernate, we may easily find documentions and tutorials and sample applications to get acquainted with it. This is not the case for FluentNHibernate. Particularly as per the project I'm working on right now which demands that I investigate further about NHibernate and its options (FluentNHibernate for instance) in order to document the rules of usage and the best practices of NHibernat and FluentNHibernate technology. Thus, being handcuffed with VB.NET, being a C-Style developer, I can't find some syntax equivalencies in VB.NET for the examples provided, though I made I way so far

View 3 Replies

VS 2008 .NET For NHibernate And Fluent NHibernate?

Oct 26, 2010

I would like to ask if you can use VB.NET for NHibernate and Fluent Nhibernate?I have searched the web, but I can't seem to get a detailed or explicit statement that tells that one can use VB.NET for NHibernate and with Fluent.

Many of the samples in the NHibernate site are made in C#. That's why I was wondering if I can't use VB.NET when using NHibernate.

View 2 Replies

Sort Linq Results Ascending Using Subselect And Then Descending?

Nov 11, 2011

I am trying to work out a LINQ query to pull items from a List, the List contains a child-nested List - which I need to query for an item, then use the resulting item in my final sort of all records returned the query.[code]...

View 1 Replies

VS 2008 Singleton Factory Implementation - Is Pattern Implementation Right

Mar 18, 2010

So I've been doing some research on the singleton factory design pattern, and I am wondering if my example implementation is correct (warning I did get carried away creating animals):

[Code]...

View 6 Replies

Why Encoding.Default.GetBytes() Returns Different Results In C#

May 29, 2009

We recently came across some sample code from a vendor for hashing a secret key for a web service call, their sample was in VB.NET which we converted to C#. This caused the hashing to produce different input. It turns out the way they were generating the key for the encryption was by converting a char array to a string and back to a byte array. This led me to the discovery that VB.NET and C#'s default encoder work differently with some characters.

C#:
Console.Write(Encoding.Default.GetBytes(new char[] { (char)149 })[0]);

VB:
Dim b As Char() = {Chr(149)}
Console.WriteLine(Encoding.Default.GetBytes(b)(0))

The C# output is 63, while VB is the correct byte value of 149.if you use any other value, like 145, etc, the output matches.Walking through the debugging, both VB and C# default encoder is SBCSCodePageEncoding.I have corrected the sample code by directly initializing a byte array, which it should have been in the first place, but I still want to know why the encoder, which should not be language specific, appears to be just that.

View 5 Replies

Catch Block In Text.vb And Display The Results In Default.aspx?

Feb 26, 2010

Catch block in text.vb and display the results in default.aspx

View 5 Replies

ASP.net: Gridview Datasource Caching ?

Sep 16, 2010

I currently have a control that called MyGridview that inherits Gridview. It has a paging template within it for customized paging options, and I'm at the point where I want to cache the initial datasource for better performance.I haven't done this in a long time, so perhaps there is a different solution these days with the newer frameworks.Before, I simply used a Cache object that was named whatever the gridview was named. I couldn't use the same gridview name through the application though.Is there a best way to have a cache object, or some other object like a session within the control to store those unique datasets for paging and sorting?

View 1 Replies

Program Keep Caching Data

Jan 8, 2010

I'm pulling data from a Lotus Notes database, this works fine but when I change the data and pull it again, it doesn't take the changes, a restart solves this so it must be getting cached somewhere, how do I prevent it?[code]...

View 7 Replies

VS 2008 .net Data Caching?

Jul 27, 2009

Is it possible to cache dataset which is accessible globally.Example: One windows service creates a dataset and caches it.Another Web Application and Windows application references that cache and populates in datagrid.

View 2 Replies

.net - Suitable Method To Implement Caching In Asp.net?

May 14, 2012

I need to implement caching in Asp.net web application My need to store data with different ID's. So which method is better ?

Use a dictionary variable. Insert the data (key as ID and data as value).

Dim mDict As New Dictionary(Of String, String)
mDict .Add(bID, uwtTree.WriteXmlString(True, True))
Cache.Insert("mTree", mDict)

[Code]....

Which method is the best way ? Or is there any other method exists ? I am using .Net 3.5 /IIS 7 (VB.Net).

View 1 Replies

C# - Disable Asp.net Caching On Selected Page?

Jul 5, 2010

Is there a way to disable asp.net caching on selected page. It would be nice if this can be done from the web.config.

View 3 Replies

C# - Image Caching On Client Side?

Feb 24, 2011

I'm having a http handler that is retrieving images from the file system on the server. I need to cache these images on the client side(browser). For that thing i'm doing the following code

context.Response.Clear()
context.Response.ClearHeaders()
context.Response.ClearContent()

[Code].....

The thing happening with this is ... When i switch between the tabs its taking it from the cache... but when i hit the browsers refresh button its again going to the file system on the server. how to cache these images on the client side.

P.S: Cant do markup caching for all the pages im my application.

View 1 Replies

Caching Propertyinfo Of Abstract Class?

Jan 19, 2012

I've been playing around with implementing an abstract base class that using reflection accomplishes SQL to Object mapping.

I did some benchmarks and decided I wanted to implement a caching strategy for the property info of the objects (to prevent future lookups on them). My first instinct was to try and implement something like this.

Public MustInherit Class BaseModel
Implements IFillable
Private Shared PropertyCache As List(Of PropertyInfo)

[Code]....

View 1 Replies

Disable Caching In NET WebBrowser Control?

Aug 6, 2010

I have been googling for hours and trying to figure this out, and I just can't.I have 1 webbrowser control on a form, webbrowser1. Once I load a page, say google.com, if I use webbrowser1.refresh() or webbrowser1.navigate("google.com"), it's not reloading the page, it has it cached so it's just reloading the cache. This is terribly apparent especially on pages like forums or craigslist.

View 6 Replies

How To Prevent Query Caching In CRM 2011 Sdk

Mar 19, 2012

I've tried applying several suggestions found on the web, but still experiencing cached results when querying CRM 2011 with linq. My web.config reads as follows, which is supposed to disable result caching:[code]I can live with that, but it would be nicer, instead of recreating the context, to have a way of ensuring no caching either in code or in web.config.

View 2 Replies

Prevent NET From Ever Disk Caching A Variable?

Sep 29, 2010

I'm not sure I wrote the headline right, but I've got a service that holds a password in memory. It's notification thing, and so will be running 24/7 ideally.

It uses a password to some other resources that I send to it at startup in a UPD packet.

I'd like to find a way to instruct windows never to stick that value in the disk cache so if the worst happened, the theoretical bad guy couldn't pick apart the cache and find the password.

View 1 Replies

Caching - Clear The Cache And Cookies In A Webbrowser?

Nov 19, 2011

I'm making a webbrowser for the pc's on my school, but I want to clear cache & clear cookies everythime someone exit's the webbrowser. Is there a simple code for it?

View 1 Replies

Caching DataSet Objects When Data Changed In SQL?

Oct 5, 2009

A quick question on caching dataset objects. How can I know if the data is changed in Sql when caching data? I don't want to specify time constraints but used a strategy where data is changed in sql and I have to refresh my cache?

View 1 Replies

WinForms App Data Caching - In Which Layer To Cache

Feb 27, 2009

We have data that's updated nightly in a database residing in the same instance as my app's database. So to save on database calls, I want to cache this static-for-the-day data into a List(Of MyObject). From a theory point of view, should this cached List(Of ) be cached in the presentation layer code, via a global variable? Should it be in a global variable in the .DLL?I'm thinking in the .DLL, because I created a service layer, which is exposed publicly to the GUI and makes calls to the data access layer inside the .DLL:

Public Shared Function Search(ByVal criteria As Core.Other.Customer) As List(Of Core.Other.Customer)
' TODO: Check the customer cache to see if it has been populated yet. If not, populate it.
If 1 = 1 Then

[code]....

View 3 Replies

Make The Items In The TreeView To Sort Faster Or Something Totally Different To Sort Them Easier?

Dec 15, 2010

How can I improve this bit below to make the items in the TreeView to sort faster or something totally different to sort them easier?

[Code]...

View 4 Replies

C# Conversion To VB And Properties - Implement Image Caching For A Web Application

Aug 17, 2010

I am trying to implement image caching for a web application and I found some code on the Internet that implements an HttpHandler that does this. The code was in C# and since my web app is written in VB, I decided to convert the code to VB. I managed to convert everything except the following code (in bold):

public class FileExtensionCollection : ConfigurationElementCollection
{
public override ConfigurationElementCollectionType CollectionType
{

[CODE]...

From what I can understand, the two properties above provide a way to access the FileExtension collection either using an integer or a string index. My problem is that I do not know how to convert this in VB.

View 3 Replies

Caching - Create A Simple App In VB 2008 That Uses A WebBrowser Control

Mar 10, 2009

Have experience with web scripting languages and SQL but am still getting used to VB.Currently using VS2008 to create a simple app in VB 2008 that uses a WebBrowser control. The user navigates to a web page, hits a button, and then every minute the web browser automatically refreshes, gets the page length, and alerts if the page length has changed by more than 100 chars.Unfortunately, I am noticing that VB uses the cached version of the page when it refreshes (I am using WebBrowser.Refresh, but have also tried using WebBrowser.Navigate(same page as before)). Is there any way that I can delete just that page in the cache without clearing the whole thing from my application before it reloads and calculates the new page length?

View 2 Replies

Prevent Caching Of Data - Only Allow To Download Latest Files

Jul 2, 2010

I'm using interop.msxml2.dll to open XML and txt files off an Internet server. The response that is received from the server is stored in my application's variables. I've recently noticed that the application doesn't always update the information when it goes to download a file that it has already downloaded in the past. For example, if it downloaded a file off the server when it started up, then when it attempted to download the new, changed file 5 minutes later, it would still return the same value as the first one. Even after closing the application, it would still return the incorrect, older value. How to stop this "caching" of data, and only allow the program to download the latest file off the server.

View 1 Replies

.net - Use List.Sort And Comparision(of T) To Sort Descending/Ascending?

Jul 5, 2011

I have a MyObject; myObjects as List(Of MyObject) and a delegate Comparison(Of MyObject) that uses a lot of comparison functions (ByA, ByB, ByC etc) Ã la:

Shared Function CompareMyObjectsByName(x As MyObject, y As MyObject) As Integer
Return x.Name.CompareTo(y.Name)
End Function

[Code].....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved