System.Diagnostics.Debugger.Break();
Saturday, January 18, 2014
Error for enumerable when using JsonConvert.SerializeObject
[Serializable] public abstract class Entity { public Entity() { } public Entity(int id) { this.Id = id; } public virtual int Id { get; set; } public override bool Equals(object obj) { Entity other = (Entity)obj; return this.Id == other.Id; } public override int GetHashCode() { return this.Id.GetHashCode(); } }
Labels:
ASP.NET,
C#.NET,
Enumerable,
Error,
JsonConvert
Observer Design Pattern in Jquery
Attach a trigger event for publisher $('div').on('click', function(e) { $(this).trigger('MyEvent',e,parameterValue); }); Attach subscriber methods $(document).on('MyEvent', function(e,parameterValue) { //Do your stuffs with parameterValues.. });
Monday, January 13, 2014
Overwrite Appsetting in ASP.NET MVC
var config = WebConfigurationManager.OpenWebConfiguration("~"); config.AppSettings.Settings["appSettingKey"].Value ="Updated value"; config.Save(ConfigurationSaveMode.Minimal, false); ConfigurationManager.RefreshSection("appSettings");
Subscribe to:
Posts (Atom)