Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "aaron"

Answer

Currently for the User table, Surname and First name is required, what is the best way to change it to optional instead?

In general, it may not possible due to a limitation (feature) of the Required attribute. Related issue: https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1274

Can you check if the workaround (to allow empty strings) just posted there works?

also I would like to make full name required.

This should not be a problem:

[Required]
public override string FullName { get; set; }

Show the error log in *.Web.Mvc\App_Data\Logs instead of what you think the error is.

Answer

You need Abp.EntityFramework v2.3.0, which should be compatible with ASP.NET Zero v4.0 to v4.4. ASP.NET Zero v4.5 to v4.6 should use Abp.EntityFramework v3.1.2.

The video might help, but it just says InternalServerError.

Can you show the error log in *.Web.Mvc\App_Data\Logs?

Answer

I don't seem to have this method available.

Can you show what you did?

Not quite sure how I would achieve my aim with this method anyway?

Simple:

protected override void ApplyAbpConceptsForModifiedEntity(DbEntityEntry entry, long? userId, EntityChangeReport changeReport)
{
    if (entry.Entity is MyRowVersionEntity)
    {
        entry.OriginalValues["Timestamp"] = entry.CurrentValues["Timestamp"];
    }

    base.ApplyAbpConceptsForModifiedEntity(entry, userId, changeReport);
}
Answer

I would like to know how could I prevent a person from fetching another users profile if they know their email address.

You can use AbpSession.UserId and get the current user's profile.

Or should I return the users id when they log in and make all other calls using the userid.

Make calls with auth token and AbpSession.UserId will be available.

The account(login) webapi returns an ajax response is it possible for it to return an object.

You can use [DontWrapResult] on a method to return only the object.

Can you show the error?

Answer

I will therefore need to override the update method. I assume the way to do this is via a custom repository?

Actually, you might want to override ApplyAbpConceptsForModifiedEntity in YourDbContext instead (reason below).

If so, how do I get the framework to call this rather than the default Update method? If I call it manually, how do I ensure that the default Update method doesn't get called by the Unit Of Work manager?

The framework (and UnitOfWorkManager) doesn't call Update, but automatically saves changes (incl. ApplyAbpConcepts).

You can disable audit logging by attribute using [DisableAuditing].

Showing 1331 to 1340 of 1543 entries