There was a need to create .proto definition files from the definitions of a reverse engineered database first project. The approach taken was that of using System.Emit to generate the type definitions and feed those to protobuf-net and use its ability to generate the .proto files.
There are only three classes needed:
The ContextFinder is pretty straight forward. It uses reflection to get all the generic parameters of DbSet<> properties within a DbContext. Then, ClassGenerator is used to copy the properties of the Types we harvested into a new type with the addition of adding ProtoContract and ProtoMember appropriately. Then, the Program class just loads the assembly from the file specified and runs the previously two mentioned classes.
My Pluralsight course, Identifying Existing Products, Services, and Technologies in Use for Microsoft Azure, is out an available here. Check it out, here is the short and long descriptions:
Microsoft Azure can host almost any application, but understanding how to use it with existing workflows is a must. In this course, you will learn how to integrate existing workflows, technologies, and processes with Microsoft Azure.
Knowing how to integrate Microsoft Azure with an existing app’s workflow is essential to using Azure to host that application. In this course, Identifying Existing Products, Services, and Technologies in Use for Microsoft Azure, you will learn foundational knowledge of and gain the ability to navigate the Microsoft Azure documentation and utilize the tools for Microsoft Azure. First, you will discover how to navigate through the Microsoft Azure documentation. Next, you will learn how to utilize the different guides and tutorials of the Microsoft Azure products. Finally, you will explore how to work with Microsoft Azure using your existing tools and workflows. When you are finished with this course, you will have the skills and knowledge of Microsoft Azure tools and documentation needed to use the products, services, and technologies provided.
Coming soon I will be authoring a course for Pluralsight titled – “Identify Existing Products, Services and Technologies in Use For Microsoft Azure” . This course targets software developers who are looking to get started with Microsoft Azure services to build modern cloud-enabled solutions and want to further extend their knowledge of those services by learning how to use existing products, services, and technologies offered by Microsoft Azure.
Microsoft Azure is a host for almost any application, but determining how to use it within existing workflows is paramount for success. In this course, Identify Existing Products, Services and Technologies in Use, you will learn how to integrate existing workflows, technologies, and processes with Microsoft Azure.
We explore Microsoft Azure with the following technologies:
- Languages, Frameworks, and IDEs –
- IntelliJ IDEA
- Visual Studio Code
- .NET Core
- Microsoft Azure Products
- Azure App Services
- Azure Kubernetes
- Azure Functions
- Azure IoT Hub
Hopefully we can take a developer familiar with the languages, frameworks, and ides available and make have them up and running on Microsoft Azure after this short course.