protected override void Dispose(bool disposing) { if (disposing) { _db.Dispose(); } base.Dispose(disposing); }
private string mapOrganizationSeoName(string seoName) { RegisterDbContext db = new RegisterDbContext(); string organizationName = seoName; var queryResultsRegisterItem = from o in db.RegisterItems where o.seoname == seoName select o.name; var name = queryResultsRegisterItem.FirstOrDefault(); organizationName = name.ToString(); db.Dispose(); return(organizationName); }