public void Add(Product product) { EFProductRepository repo = new EFProductRepository(); if (product == null) throw new HttpResponseException(System.Net.HttpStatusCode.BadRequest); try { repo.Save(product); } catch { throw; } finally { repo = null; } }