Thanks for your package. I really liked your Service factory so I reused it in another project but with generic instead of creting a new property for each service :
public static THelper GetHelper<THelper>() { var key = string.Concat("factory-", typeof(THelper).Name); if (!HttpContext.Current.Items.Contains(key)) HttpContext.Current.Items.Add(key, (THelper) Activator.CreateInstance(typeof (THelper), new object[] {})); return (THelper)HttpContext.Current.Items[key]; }
ServiceFactory
Hello,
Thanks for your package. I really liked your Service factory so I reused it in another project but with generic instead of creting a new property for each service :
And to use it :
What do you thing of it ?
Like it! Thanks :) Will probably use that.
is working on a reply...