I think the way to go is to subscribe to event bus events, and then log changes to entities where applicable. Is there a way to subscribe to the event bus, so that I receive an event for any entity change?
I can see that I can subscribe to EntityCreatingEventData<TEntity>, for update create and delete, but I have to state the Entity type. Is there to not specify the entity type, so that I receive events for all entity changes?
thank you.
I solved this by downloading a latest copy of the whole project from the website with the latest version, and merging the changes into my existing project.
This is an MVC project, and there is no package.json for yarn to act on.
But I agree that I need to upgrade to latest sweetalert.
The folder looks like this currently:
So I need to update this entire folder to latest. Where do I get these? For instance, I pulled latest using yarn, but the node_modules\sweetalert folder does not contain all these files so that I can replace them. the .scss, html, css, and ie9.css files are missing in the node.js version of sweetalert.
The sweetalert nuget package was not used in the MVC project either, and the latest nuget package is on an old version anyways.
I tried replacing the js files with the ones from the npn repository, but that does not work at all.
It looks like someone handcrafted the sweetalert folder in the libs folder for the MVC project, but I might be wrong.
So I guess my question is how do I go about updating sweetalert to latest in the MVC project?
I am still getting these exceptions after all. So what do you guys need to trouble shoot this further?
Ok no problem. You guys might want to adjust the documentation here (<a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Timing">https://aspnetboilerplate.com/Pages/Documents/Timing</a>) a bit, it contains the following:
ABP automatically normalized DateTimes received from database based on the current clock provider, when EntityFramework or NHibernate modules used.
I am using angular 1, with MVC backend.
It doesnt look like it... The exception is: System.OverflowException: Arithmetic operation resulted in an overflow.
either way, I havent seen it in a while. If it comes back I will just post here again.
I could do that, but then we will never know why this error is happeneing.
I will share the whole file:
using System.Data.Common;
using System.Data.Entity;
using Abp.Zero.EntityFramework;
using PCM.Authorization.Roles;
using PCM.Authorization.Users;
using PCM.Chat;
using PCM.Friendships;
using PCM.Models.Parties;
using PCM.Models.Policy;
using PCM.Models.PolicyDefinition;
using PCM.Models.Sequence;
using PCM.MultiTenancy;
using PCM.Storage;
using static PCM.Models.Enums.Enums;
namespace PCM.EntityFramework
{
/* Constructors of this DbContext is important and each one has it's own use case.
* - Default constructor is used by EF tooling on design time.
* - constructor(nameOrConnectionString) is used by ABP on runtime.
* - constructor(existingConnection) is used by unit tests.
* - constructor(existingConnection,contextOwnsConnection) can be used by ABP if DbContextEfTransactionStrategy is used.
* See http://www.aspnetboilerplate.com/Pages/Documents/EntityFramework-Integration for more.
*/
public class PCMDbContext : AbpZeroDbContext<Tenant, Role, User>
{
/* Define an IDbSet for each entity of the application */
public virtual IDbSet<BinaryObject> BinaryObjects { get; set; }
public virtual IDbSet<Friendship> Friendships { get; set; }
public virtual IDbSet<ChatMessage> ChatMessages { get; set; }
public virtual IDbSet<PolicyDefinition> PolicyDefinitions { get; set; }
public virtual IDbSet<ClonedPolicyDefinition> ClonedPolicyDefinitions { get; set; }
public virtual IDbSet<Party> Parties { get; set; }
public virtual IDbSet<Policy> Policies { get; set; }
public virtual IDbSet<PolicyPartyRelationship> PolicyPartyRelationships { get; set; }
public virtual IDbSet<PartyProperty> PartyProperties { get; set; }
//enums
public virtual IDbSet<TimeSpan> PolicyDefinitionTimeSpans { get; set; }
//sequence
public virtual IDbSet<SequencePosition> Sequences { get; set; }
public virtual IDbSet<Gender> Gender { get; set; }
public PCMDbContext()
: base("Default")
{
}
//protected override void OnModelCreating(DbModelBuilder modelBuilder)
//{
// //modelBuilder.Entity<ClonedPolicyDefinition>().Map(m =>
// //{
// // m.MapInheritedProperties();
// // m.ToTable("ClonedPolicyDefinitions");
// //});
//}
public PCMDbContext(string nameOrConnectionString)
: base(nameOrConnectionString)
{
}
public PCMDbContext(DbConnection existingConnection)
: base(existingConnection, false)
{
}
public PCMDbContext(DbConnection existingConnection, bool contextOwnsConnection)
: base(existingConnection, contextOwnsConnection)
{
}
}
}
After a while, I start getting those exceptions again, even with latest nuget packages. The site seems to be working, but whatever is happening on these timer intervals surely has a purpose, and it is breaking currently. Also, the logs are being poluted by these exceptions. Please advise.