Got it to work by going this route
using (var context = new Context())
{
context.Customers.Add(customer);
context.SaveChanges();
return Ok(customer);
}