public void Save() { renoRatorDBEntities db = new renoRatorDBEntities(); this.address.city = db.Cities.Where(c => c.cityID == this.address.cityID).FirstOrDefault(); this.address.country = "Canada"; this.address.postalCode = this.address.postalCode.Replace(" ", "").Replace("-", "").Trim(); List<string> tagList = new List<string>(); if (this.tags != null) { foreach (String tag in this.tags.Split(',')) tagList.Add(tag.Trim().ToLower()); this.tags = string.Join("|", tagList); } db.AddToJobs(this); db.SaveChanges(); }