【发布时间】:2017-07-21 05:55:58
【问题描述】:
这是我调用的函数
this.ExecuteSQLProcedure("sp_GenerateInterface", new object[] { TableName });
上述函数的结果并存储在字符串变量中
string tableInterface =
Public Class UserMaster
{
Guid UserId { get; set; }
string UserName { get; set; }
Guid RoleId { get; set; }
string FirstName { get; set; }
string LastName { get; set; }
Guid AddressId { get; set; }
long ContactNumber { get; set; }
string ProfilePicture { get; set; }
bool? IsActive { get; set; }
Guid? EntryBy { get; set; }
DateTime? EntryDate { get; set; }
Guid? UpdatedBy { get; set; }
DateTime? UpdatedDate { get; set; }
Guid? DeletedBy { get; set; }
DateTime? DeletedDate { get; set; }
string Email { get; set; }
bool fnCheckContactNumberExists( long ContactNumber );
bool fnCheckEmailExists( string Email );
bool fnCheckUserExistsorNot( string LoginCredential );
bool fnCheckUserNameAvailable( string UserName );
bool fnCheckUserNameExists( string UserName );
bool fnCheckUserStatus( string LoginCredntial );
string fnGenerateFrenchiseNumber( );
string fnGetFirstLastName( string LoginCredential );
Guid fnGetUserId( string LoginCredential );
void sp_AuthenticateLogin( string LoginCredential, out string Message, out string MessageType, string Password );
void sp_CreateUser( string City, long ContactNumber, string Email, string FirstName, string HouseNo, string LandMark, string Lane, string LastName, string LoginCredential, out string Message, out string MessageType, string Password, string Street, string UserName );
}
现在我想实例化这个类,以便我可以在任何地方使用它
【问题讨论】:
-
欢迎来到Stack Overflow,我认为从字符串实例化一个对象可以得到很多结果(例如this)。但是实例化一个接口...也许你应该尝试搜索Stack Overflow和google,如果仍然无法得到你的结果,你可以在这里再次询问。
-
您的意思是存储过程返回接口的C# 表示,并且您要使用该接口?我说对了吗?
-
是的 Chetan Ranpariya,我的存储过程返回 Class 的 c# 表示形式,我想使用该类。首先它是接口,以便我可以实现或继承接口,现在我转换为类
标签: c# asp.net .net system.reflection