Abp.EntityFrameworkCore interface does not implement IDbSet interface as specified on this page: https://aspnetboilerplate.com/Pages/Documents/EntityFramework-Integration?searchKey=AbpDbContext
I want to access MS EFCore directly instead of using Repository (which runs 15X slower than ASP.NET EF). My project is Angluar/Core.
When 'Abp.EntityFrameworkCore' is included in my project I keep getting the following error at Web.Host.Startup.cs, line 134: System.TypeLoadException HResult=0x80131522 Message=Method 'get_IsTraceEnabled' in type 'Abp.Castle.Logging.Log4Net.Log4NetLogger' from assembly 'Abp.Castle.Log4Net, Version=4.6.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. Source=Abp.Castle.Log4Net
When debugging a background job ... (https://aspnetboilerplate.com/Pages/Documents/Background-Jobs-And-Workers) ...If debug execution is terminated (i.e. at a breakpoint) before the job finishes, the background job attempts to continue where it left off when the debugger is started again.
How can I find the background job in the Task Manager and manually kill it? Or is there another way to kill the background job?
Also, how can I kill a running background job programmatically?
Side menu does not automatically collapse after selection and navigation to target page. Manual close (another click) is required to close the menu. Angular/Core Version 7.0.0.
I migrated from v6.8.0 to v7.0.0 (Angular + Core)
The top menubar dropdown has stopped responding.
Click on 3 vertical dots works.
Click on flag, bell, or \admin no response.
There is no ANZ Typescript code invoked when the images are clicked.
There are no (click) events in topbar.component.html
that might open the next level menus.
How can I diagnose the menu bar (hidden events) to identify the source of the problem?
Also, the dropdown menu is hidden behind my custom page (just the top is peeking out).
How can I force the dropdown to stay on top?
When searching the repository for "customize" 53 results are returned. When searching for "theme" 165 results are returned. When searching for "customize theme" 1 result is returned: this one. When searching for the above 2 words in reverse order, 0 results are returned. How can I search the respository for the existence of words, instead only for an exact match phrase?
I have a routine that processes files of data to be parsed and written to my db. I'm using IUnitOfWorkManager:
IUnitOfWorkManager unitOfWorkManager;
... initialization ...
try
{
using (var unitOfWork = unitOfWorkManager.Begin())
{
do
{
... process an input file record ...
if (error_1)
{
status.success = false;
status.FailureReason = "some reason";
return status;
}
else if (error_2)
{
status.success = false;
status.FailureReason = "some other reason";
throw new Exception("MyException");
}
else
{
... get next record from input file ...
}
} until EOF;
unitOfWork.Complete();
status.success = true;
return status;
}
}
catch (Exception ex)
{
if (ex.Message == "MyException")
{
return status;
}
status.Success = false;
status.FailureReason = ex.Message;
return failure_code_obj;
}
When a failure occurs, I want to abandon the transaction and roll back all records written within the UoW.
However, when a failure occurs, instead of rolling back the transaction (by virtue of not calling UoW.Complete() ), the records are written to the db,
and the Exception message is "Did not call Complete method of a unit of work."
I tried calling UoW.Dispose()
, tried throw new Exception("MyException")
if error - to no avail. The transaction is not rolled back and my db records are out of sync.
I do not want the system default Exception handler to pop up it's message in the browser; I have a custom error modal dialog (the return status;
has many fields describing the cause of the error and remedy for the user to fix the problem).
How can I direct UoW to abandon and roll back the current transaction, and return my custom error status?
Warning CS1998 This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.Test.Base\UiCustomization\NullUiThemeCustomizerFactory.cs UserApp.Test.Base C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.Test.Base\UiCustomization 8 Active
Warning CS0693 Type parameter 'T' has the same name as the type parameter from outer type 'AppTestBase<T>' C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.Test.Base\AppTestBase.cs UserApp.Test.Base C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.Test.Base 72 Active
Warning CS0693 Type parameter 'T' has the same name as the type parameter from outer type 'AppTestBase<T>' C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.Test.Base\AppTestBase.cs UserApp.Test.Base C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.Test.Base 77 Active
Warning CS0693 Type parameter 'T' has the same name as the type parameter from outer type 'AppTestBase<T>' C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.Test.Base\AppTestBase.cs UserApp.Test.Base C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.Test.Base 106 Active
Warning CS0693 Type parameter 'T' has the same name as the type parameter from outer type 'AppTestBase<T>' C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.Test.Base\AppTestBase.cs UserApp.Test.Base C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.Test.Base 122 Active
Warning CS1998 This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.Test.Base\UiCustomization\NullThemeUiCustomizer.cs UserApp.Test.Base C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.Test.Base\UiCustomization 11 Active
Warning CS4014 Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\src\UserApp.Core\MultiTenancy\SubscriptionExpirationCheckWorker.cs UserApp.Core C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\src\UserApp.Core\MultiTenancy 77 Active
Warning CS4014 Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\src\UserApp.Core\MultiTenancy\SubscriptionExpirationCheckWorker.cs UserApp.Core C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\src\UserApp.Core\MultiTenancy 97 Active
Warning CS4014 Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\src\UserApp.Core\MultiTenancy\SubscriptionExpireEmailNotifierWorker.cs UserApp.Core C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\src\UserApp.Core\MultiTenancy 52 Active
Warning CS0618 'DiscoveryClient' is obsolete: 'This type will be deprecated or changed in a future version. It is recommended that you switch to the new extension methods for HttpClient. They give you much more control over the HttpClient lifetime and configuration. See the docs here: https://identitymodel.readthedocs.io' C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.ConsoleApiClient\Program.cs UserApp.ConsoleApiClient C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.ConsoleApiClient 41 Active
Warning CS0618 'TokenClient' is obsolete: 'This type will be deprecated or changed in a future version. It is recommended that you switch to the new extension methods for HttpClient. They give you much more control over the HttpClient lifetime and configuration. See the docs here: https://identitymodel.readthedocs.io' C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.ConsoleApiClient\Program.cs UserApp.ConsoleApiClient C:\AspNetZero\UserApp 6.8.0 Core 2.2\UserApp\aspnet-core\test\UserApp.ConsoleApiClient 47 Active
I need to access my db outside the typical .Application service (which uses injected IRepository objects). The table has been created with the migrator via the following:
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "TtmErrorLog",
columns: table => new
{
LogId = table.Column<int>(nullable: false)
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
ErrorDate = table.Column<DateTime>(nullable: false),
CreateBy = table.Column<long>(nullable: true),
ErrorText = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TtmErrorLog", x => x.LogId);
});
}
The context::
using System.Data.Entity;
namespace ExceptionsLibrary
{
public class ErrorLogContext : DbContext
{
public ErrorLogContext() : base("ngTTMDb")
{
}
public DbSet<ErrorLog> ErrorLogs { get; set; }
}
}
The table object:
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ExceptionsLibrary
{
[Table("TtmErrorLog")]
public class ErrorLog
{
[Key]
public int LogId { get; set; }
public System.DateTime ErrorDate { get; set; }
public long? CreateBy { get; set; }
public string ErrorText { get; set; }
}
}
The ErrorWriter
library has the following:
public class ErrorWriter
{
private static ErrorLogContext errLogContext;
private ErrorLog errorItem;
private StringBuilder memoryString;
public void Init()
{
errLogContext = new ErrorLogContext();
errorItem = new ErrorLog;
}
public void writelog(int userId, string errmsg)
{
using (SqlConnection con = new SqlConnection(errLogContext.Database.Connection.ConnectionString))
{
errorItem.CreateBy = userId;
errorItem.ErrorText = errmsg;
errLogContext.ErrorLogs.Add(errorItem);
errLogContext.SaveChanges();
con.Close();
}
}
}
App.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
Installed packages:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.2.0" targetFramework="net452" />
<package id="System.Data.Common" version="4.3.0" targetFramework="net452" />
<package id="System.Data.SqlClient" version="4.6.0" targetFramework="net452" />
</packages>
My app is Angular/Core. The code above has been migrated from another working app. I'm using the default MS-SQL Server that ANZ provides. The problem is an Exception is thrown when ' errLogContext.ErrorLogs.Add(errorItem);' is executed. The full Exception message is:
Unable to determine the provider name for provider factory of type 'System.Data.SqlClient.SqlClientFactory'. Make sure that the ADO.NET provider is installed or registered in the application config.
How is the factory provided and registered?
Is there a way for ANZ to consolidate/merge ANZ and Abp migrations periodically into a single migration (or one each for ANZ and Abp) for major releases going forward? i.e. 7.0.0, 8.0.0, etc.
My project currently has 60 merges between ANZ, Abp, and my own. I plan to merge my migrations to a single "Initial" migration as soon as my initial development phase has completed. Would like to keep the number of migration files to a minimum by merging migrations on a release schedule.
Can this be done? How might consolidated migrations be applied to the db once the app has been put into production?
Thank you.
I'm migrating a file from another working app into .Core project. I'm not able to find a package or library to supply the Graphics class, hence, the symbol remains unresolved.
using System.Drawing;
public int X, Y, Width, Height;
public int Draw_Box(Graphics gfx)
{
gfx.DrawRectangle(Pen, X, Y, Width, Height);
return Height;
}
The Graphics class is resolved in .Application project.
What package/library will resolve the reference in .Core project?