If you don’t require it to be a proper Model resource that you assign to eg. StaticModel component, the easiest way is to use the CustomGeometry component, which allows you to specify vertices, normals, UVs etc. one by one. It’s very much inspired by Ogre’s ManualObject. The downsides are that it’s an unique instance, so you can’t render many of them without defining the vertices for each, and the geometry is always unindexed.
To create a proper Model programmatically, create the vertex & index buffers with data, create a Geometry object which references the buffers and sets a draw range, then create a Model object and assign the geometry to it. Studying the AssetImporter tool’s code may be of use, as it does exactly that to save a model. For inspiration in how to define the vertex & index data & geometries you can also look at Renderer::CreateGeometries() function which creates the deferred rendering lighting volumes purely in code.
To create a Material, just create one and assign a suitable Technique resource (for example CoreData/Techniques/Diff.xml) to it by calling Material::SetTechnique(). The material should have quite sane defaults (white diffuse color, clockwise vertices are rendered, no textures initially.)
If on the other hand you also want to create the Technique from scratch, that’s more complicated, as you need to create the shader passes (base, lighting etc.) and assign shaders to each. In that case I recommend taking a look at how Technique loads itself.