public class Book : AuditedEntity<int>, IHasConcurrencyStamp
{
[NotNull]
public virtual string Title { get; set; }
public virtual int Pages { get; set; }
public virtual DateOnly? PublishDate { get; set; }
public string ConcurrencyStamp { get; set; }
protected Book()
{
}
public Book(string title, int pages, DateOnly? publishDate = null)
{
ConcurrencyStamp = Guid.NewGuid().ToString("N");
Check.NotNull(title, nameof(title));
Title = title;
Pages = pages;
PublishDate = publishDate;
}
}
3 Add the data annotations so it would audit only the "PublishDate" property as by the documentation (https://docs.abp.io/en/abp/latest/Audit-Logging#enable-disable-for-entities-properties)
[DisableAuditing]
public class Book : AuditedEntity<int>, IHasConcurrencyStamp
{
[NotNull]
public virtual string Title { get; set; }
public virtual int Pages { get; set; }
[Audited]
public virtual DateOnly? PublishDate { get; set; }
public string ConcurrencyStamp { get; set; }
protected Book()
{
}
public Book(string title, int pages, DateOnly? publishDate = null)
{
ConcurrencyStamp = Guid.NewGuid().ToString("N");
Check.NotNull(title, nameof(title));
Title = title;
Pages = pages;
PublishDate = publishDate;
}
}
4 Create a record for the entity 5 Edit the property "Title" of the record 6 In the "Audit logs" page then "Entity Changes" notice how an empty record has been created
It would be helpful if it created the record only when an Audited property is changed.
I also had a similar problem in the scenario where I need to have the ability to log in locally and the ability to login via Active Directory active, but a user cannot "self" register. Only an administrator can create accounts and without a created account a user cannot log in.
See my post https://support.abp.io/QA/Questions/6843/External-Provider-login-is-able-to-register-a-user-even-if-self-register-setting-is-disabled
So I also had to override the methods, but I think the correct solution is to have a flag that enables/disables the creation of a local user (self registration) and a flag that enables/disables registration from External Provider (automatic external registration)
Is it possible to have this feature?
Thanks
We ask that you follow the Microsoft version lifecycle guides https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core#lifecycle
We have software in production created with Abp Commercial and our customers request to use only packages covered by Long Time Support.
If we are forced to migrate to .Net 9 or any STS version we will be forced to look for other frameworks.
Thanks
Because the templates are not yet perfect and sometimes contain errors, I had to customize them. When a new version is released, it is relatively time-consuming to find out whether I can switch back to the original template, whether I have to continue using my modified template or whether I should even perform a merge.
Several possible solutions come to mind:
- Easy to implement and already helpful would be to have another button "Show default". Currently you have to select "Revert customization" to see the default.
- Maybe it would also be a solution to store the original file in the same directory with a different file extension (.suite/customized-templates/Frontend.Blazor.Page.Item.razor.original.txt), then you would be able to see very well in Git whether changes have been made in the original (new version) and you would also have the possibility to make a diff with your own changes.
- The "deluxe version" would be if you were to implement a merge tool with which we could update to a new version ;-)
Thanks for the suggestion, I have created an internal issue for this feature request.
I would add that we would need a button like "download Zip with all template"
Thank you, but it is not our practice to perform temporary workarounds when the fix is released soon.
We are waiting for the fix.
Best regards
Will the fix be released in version 8.1-patch or versione 8.2-preview? Which is the estimated release date of the 8.1-patch?
Thanks
Does this fix disable change tracking for all entities? We have AggregateRoot type entities such as Order with List of OrderItem, does this fix have any impact on this? I believe that if I implemented it, I would break other parts of our application.
Can you explain the workaround better?
Thanks
HI, sent you the email with the test projects
#region test InsertMany
var myBooks = new List< Book >();
for (var i = 0; i < 12000; i++)
{
myBooks.Add(new Book(i.ToString(),$"Title-{i}"));
}
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
await _bookRepository.InsertManyAsync(myBooks, true);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Console.WriteLine(ts);
#endregion
It takes 60 times longer !!!
We use InsertMany in import jobs and execution times have now gone from a few seconds to many minutes and those that used to take a few minutes now take hours.
We cannot upgrade to 8.1.0 stable because it would block the application in production.
From the release logs there is no evidence of changes in this area.
What has changed?
When creating an entity with abp suite, in the appservice, use IReadOnlyRepository for lookup entities rather than IRepository so it wont be tracking the entity