Search Results

Search found 8 results on 1 pages for 'hotyi'.

Page 1/1 | 1 

  • unit test SqlCacheDependency

    - by hotyi
    I'm using SqlCacheDependency in asp.net application, and i'm using HttpRuntime.Cache to cache items. and the application works well only when i debug the web application, but the HttpRuntime.Cache will not be notified when some data changes from the db when i debug the application in the unit test mode. Anyone have suggestions to make HttpRuntime.Cache to work under unit test?

    Read the article

  • config sqlcachedependency

    - by hotyi
    i know SqlCacheDependency could push the modified data from db to the Cache, i want to know if the I could config the sqlcachedependency not push the modified data immediately, but push every 1 minute.

    Read the article

  • OO design for business logic

    - by hotyi
    I have one Sell Operation object and two Buy Operation objects, i want to implement such behavior that one Sell Operation discharges two Buy Operation, it looks like: sellOperation.Discharge(oneBuyOperation); sellOperation.Discharge(twoBuyOperation); so i want to ask whether i should call the repository function in the Discharge method, or i'd better call the repository save method outside Discharge method. like: opRepository.Save(sellOpertion); So anyone could give me some advise what are you going to implement in this scenario? using Service class or anything better way?

    Read the article

  • Service design or access to another process

    - by hotyi
    I have a cache service,it's works as .net remoting, i want to create another windows service to clean up the that cache service by transfer the objects from cache to files. because they are in separate process, is their any way i could access that cache service or do i have to expose a method from the cache service to do that clean up work? the "clean up" means i want to serialize the object from Cache to file and these saved file will be used for further process. let me explain this application more detail. the application is mainly a log service to log all the coming request and these request will be saved to db for further data mining. we have 2 design for this log system 1) use MSMQ, but seems it's performance is not good enough, we don't use it. 2) we design a cache service, each request will be saved into the cache, and we need another function to clean up the cache by serialize the object to file.

    Read the article

  • design the interface

    - by hotyi
    i want to design an interface has the function to do mapping from Entity object to Form object public interface IFormToEntityMapper { TEntity Map(TForm tForm); } and vise versa. public interface IEntityToFormMapper { TForm Map(TEntity tEntity); } i have the question if i should define these two functions in one interface and seperate them to different interface. if i put them into one interface, does that violate the SRP?

    Read the article

  • not use "using" statement for TransactionScope

    - by hotyi
    i always using the following format to use transactionscope. using(TransactionScope scope = new TransactionScope()){ .... } sometimes i want to wrap the transactionscope to a new class, for example DbContext class, i want to using the statement like dbContext.Begin(); ... dbContext.Submit(); it seems the transactioncope class need use "using"statement to do dispose, i want to know if there is anyway not use "using".

    Read the article

1