Meta programming is used to write programs that manipulate other programs. In this paper, we are interested in the use of meta programming for code generation generally and in syntactically correct, type safe methods for manipulating code fragments specifically. We require a strictly typed programming language with self-hosting meta programming support. Some techniques for type safe code generation are developed in the MetaOCaml programming language and have been published before. We develop the required machinery and techniques in the F# programming language in a similar manner using the support for typed code quotations in the F# programming language and the LINQ (Language Integrated Query) features of the .NET platform. This machinery allows us to compose code fragments that are syntactically correct with type and scope safety guarantees. We also develop a domain-specific language for the construction of code generators using F# workflows.