var context = new EntityContext(); var entities = context.EntityCollection; var newEntity = new Entity() { Prop1 = "Value1", Prop2 = "Value2" }; entities.Add(newEntity);In this example, we create a new instance of an `EntityContext` (which is part of the Entity Framework library) and retrieve the `EntityCollection` property from it. We then create a new instance of `Entity` and set some properties on it. Finally, we call the `Add` method on the `EntityCollection` instance to add the new entity to the collection. Package Library: Entity Framework.