datamemberattribute
This commit is contained in:
parent
6a0424d9f1
commit
1bc9349f60
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
.vscode/
|
||||
output/
|
||||
__pycache__
|
||||
regular.cs
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using MySqlConnector;
|
||||
using de.hottis.genericdatabaseapiservice.Models;
|
||||
|
||||
@ -27,7 +28,10 @@ namespace de.hottis.genericdatabaseapiservice.Services {
|
||||
using (var reader = await cmd.ExecuteReaderAsync()) {
|
||||
while (await reader.ReadAsync()) {
|
||||
foreach (var propertyInfo in typeof(T).GetProperties()) {
|
||||
Console.WriteLine(propertyInfo);
|
||||
Console.WriteLine("Property name: {0}", propertyInfo);
|
||||
var attributes = propertyInfo.GetCustomAttributes(typeof(DataMemberAttribute), true);
|
||||
var dma = (DataMemberAttribute)attributes[0];
|
||||
Console.WriteLine("DataMember name: {0} {1} ", dma.Name, dma.TypeId);
|
||||
}
|
||||
Console.WriteLine(reader.GetString("txt"));
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ $paramsInputType['type'] $paramsInputType['name'] #slurp
|
||||
[FromBody]$operation['bodyInputType']['csName'] $operation['bodyInputType']['apiName'] #slurp
|
||||
#end if
|
||||
) {
|
||||
_dbService.JustDoSomething("Hello ${operation['func']}");
|
||||
_dbService.JustDoSomething<$operation['resultType']['csName']>("Hello ${operation['func']}");
|
||||
|
||||
// Statement:
|
||||
#if not $operation['statement']
|
||||
|
Loading…
x
Reference in New Issue
Block a user