/// <summary> /// Get Customer context mock object /// </summary> /// <returns>Context object</returns> public CustomerEntity GetCustomerContext() { var options = new DbContextOptionsBuilder <CustomerEntity>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; var context = new CustomerEntity(options); // CustomerData => table name context.CustomerData.Add(new CustomerData { Id = 111, email = "*****@*****.**" }); context.SaveChanges(); return(context); }