mygeneration

Is it possible to have intellisense support in MyGeneration when it comes to write templates?

左心房为你撑大大i 提交于 2020-01-06 23:43:18
问题 Is it possible to have intellisense support in MyGeneration when it comes to write templates? Let's say can I write my templates in Visual Studio and then paste it to MyGeneration template editor somehow? 回答1: The mygeneration editor does have limited intellisense built into it You might be able to create some templates in VS but I'd doubt they would be of much use as any intellisense they did provide wouldn't have the MyGeneration specific features I can't see exactly what features of VS

Is it possible to have intellisense support in MyGeneration when it comes to write templates?

为君一笑 提交于 2020-01-06 23:42:21
问题 Is it possible to have intellisense support in MyGeneration when it comes to write templates? Let's say can I write my templates in Visual Studio and then paste it to MyGeneration template editor somehow? 回答1: The mygeneration editor does have limited intellisense built into it You might be able to create some templates in VS but I'd doubt they would be of much use as any intellisense they did provide wouldn't have the MyGeneration specific features I can't see exactly what features of VS

How to get list of objects from BusinessEntity using myGeneration?

大兔子大兔子 提交于 2019-12-24 10:58:58
问题 I used myGeneration in some projects; I noticed that BusinessEntity keeps the result of the query in a DataTable, But what if the developer wants to get the result as List of objects? To solve this, I made the following modification for my own use. public class BusinessEntity { //.... public DataTable TheDataTable { get { return _dataTable; } set { _dataTable = value; } } public void PutTheRow(DataRow pRow) { DataRow newRow = _dataTable.NewRow(); newRow.ItemArray = pRow.ItemArray; _dataTable

How can I achieve this simple output in MyGeneration?

给你一囗甜甜゛ 提交于 2019-12-12 01:48:04
问题 If I have n tables in my Db schema and if I want to walk through all tables in my Db and create a .cs file for each table that will contain the below generated code: public class TableName { private _tableName = "<%TableName%>" //This string will be generated by MyGeneration // per each table public string TableName { get{ return _tableName; } } How should my template will be written? 回答1: I haven't worked with MyGeneration before but you can do this easily using CodeGenerator. The template