Hi,
Angular controller can not call application service. Please review bellow code:
Angular controller:
angular.module('app').controller(controllerId, [
'abp.services.app.log4net',
function (log4netService) {
var vm = this;
}])
My application service:
public class Log4NetService : ApplicationService, ILog4NetService
{
.....
}
Chrome console throw an error (please review attachment picture):
Hi all,
Could you show me same example about role and role permission in module zero?
Thanks,
Hi,
I have created a database to store log of log4net.
Please review Log4Net class which is a dbset to create table Log4Net:
public class Log4Net : CreationAuditedEntity<int> { public virtual DateTime Date { get; set; } public virtual string Thread { get; set; } public virtual string Level { get; set; } public virtual string Logger { get; set; } public virtual string Message { get; set; } public virtual string Exception { get; set; } }
And file log4net config:
<?xml version="1.0" encoding="utf-8" ?> <log4net> <appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender"> <bufferSize value="100" /> <connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <connectionString value="Server=HIEN-PC; Database=HappySport; Trusted_Connection=True;" /> <commandText value="INSERT INTO Log4Net ([Date],[Thread],[Level],[Logger],[Message],[Exception], [CreationTime]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception, @log_date)" /> <parameter> <parameterName value="@log_date" /> <dbType value="DateTime" /> <layout type="log4net.Layout.RawTimeStampLayout" /> </parameter> <parameter> <parameterName value="@thread" /> <dbType value="String" /> <size value="255" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%thread" /> </layout> </parameter> <parameter> <parameterName value="@log_level" /> <dbType value="String" /> <size value="50" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%level" /> </layout> </parameter> <parameter> <parameterName value="@logger" /> <dbType value="String" /> <size value="255" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%logger" /> </layout> </parameter> <parameter> <parameterName value="@message" /> <dbType value="String" /> <size value="4000" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%message" /> </layout> </parameter> <parameter> <parameterName value="@exception" /> <dbType value="String" /> <size value="2000" /> <layout type="log4net.Layout.ExceptionLayout" /> </parameter> </appender>
<root> <level value="DEBUG" /> <appender-ref ref="AdoNetAppender" /> </root> </log4net>
Hi all,
That's greet project! I have created an entity framework module. But I don't know how to use it in a class DbContext which already extend AbpZeroDbContext. Please give me some advice,
Thanks, Hien Phan