Base solution for your next web application

Activities of "alirizaadiyahsi"

Hi @walkerscott,

actually, translations loading with javascript when angular app start. So it is loading anly one time. Check following documentation: <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Localization#DocInJavascript">https://aspnetboilerplate.com/Pages/Doc ... Javascript</a>

Hi @indiaict

what change did you do? Could you share some code that is different from original?

Ok, you can use actionfilters for this.

Check detailed explanation for actionfilters here: <a class="postlink" href="https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/filters">https://docs.microsoft.com/en-us/aspnet ... rs/filters</a>

Hi @pankajmathur,

Actually expired users are not logging in. When a tenant subscription expired, this user status is changing to Active=0 by a scheduled job. So you cant get "currentloginInfo" for expired user.

Error is occuring while setting not getting.

Put break point SignInAsync and AppendDefaultUserOrganization to understand what value are you setting for OrgId. There may be some logical problem your if-else conditions.

I mean, where did you set ConnectSession.OrgId?

I can see the code that is in your latest post at image, but I can't see, where did you set this property? In "SignInAsync"? There is a code block above that is setting this property.

identity.AddClaim(new Claim("Organization", "1"));

Is it the code that you use set this property?

Hi @Hasan,

Could you share the code that you set the claims value?

Check this for a starting point: <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/EntityFramework-Integration#DocCustomRepositoryMethods">https://aspnetboilerplate.com/Pages/Doc ... oryMethods</a>

When you select entity from DB, EF can track this entity, if you want to do this manually, you should attach the entity to dbContext. For examlple;

// Create new stub with correct id and attach to context.
var entity = new myEntity { Id = input.Id };
db.SomeEntities.Attach(entity);

// Now the entity is being tracked by EF, update required properties.
entity.Title = "new title";
entity.Url = "new-url";
		
// EF knows only to update the propeties specified above.
db.SaveChanges();

To do this in aspnet zero, you should change repositorybase or you can write a custom repository.

Hi @ManojReddy,

if you use mapper like following, a new object is creating. So all of properties are changing.

var classobj = ObjectMapper.Map<Test>(input);

if you want to update entity, first you get the entity from database, and map it from dto like following.

var classobj = _someService.GetEntity(input.id);
ObjectMapper.Map(input, classobj );
Showing 161 to 170 of 369 entries