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

Activities of "manojreddy"

Do we have any way to list out all the compilation error in TypeScript as We have in C#? Like When We build a C# project in visual studio We get the errors in Error List window. because right now we need to manually go to the file and line number to check the error, there is no direct way.

I have a class TestRepository in which I want to get the localized string, but I get error >The name 'L' does not exist in the current context if I try

throw new UserFriendlyException(L("TestAlreadyExists"));
public class TestRepository : TestRepositoryBase<Test, int>, ITestRepository

I have a class which is having another class object as a member, When I call UpdateAsync it gives an error.

My question is why is it giving this error, its an update call not insert call so it should not give this error. ABC is a separate table.

Cannot insert explicit value for identity column in table 'ABC' when IDENTITY_INSERT is set to OFF.

public async Task UpdateTestsAsync(TestDto input)
	{
		var classobj = GetAll().Where(a => a.Id == input.Id).FirstOrDefault();
		ObjectMapper.Map(input, classobj);
		await UpdateAsync(classobj);
	}
		
public class TestDto : FullAuditedEntityDto
    {
        public string TestName { get; set; }
        public FetchABC abc { get; set; }
        public int AbcId { get; set; }
        public int Id { get; set; }
    }
	

public class ABC : FullAuditedEntity
{
	public virtual string TestName { get; set; }
	public virtual ABC abc { get; set; }
	public virtual int AbcId { get; set; }

}

So to make the above code working I'm doing

classobj.abc= null;

before

await UpdateAsync(classobj);

Is it good practice? Do you have any suggestions or better approach?

Hi,

Why do We inherit from FullAuditedEntityDto? I don't see any use for this? because in the code mentioned I get CreationTime, CreatorUserId, DeleterUserId, DeletionTime, IsDeleted, LastModificationTime and LastModifierUserId columns proper values on edit, create and delete case if I use the same Dto for all action?

Please let me know what difference between a Dto inheriting from FullAuditedEntityDto and not inheriting from FullAuditedEntityDto . Could you please explain the difference between these two cases with some practical examples.

public async Task<int> CreateTest(TestDetailsDto input)
	{
		int TestId = await InsertAndGetIdAsync(ObjectMapper.Map<Test>(input));

		return TestId;
	}
	
	public class Test : FullAuditedEntity
    {
        public const int NVarcharLength20 = 20;
        public const int NVarcharLength30 = 30;
        public const int NVarcharLength50 = 50;

        [Required]
        [MaxLength(NVarcharLength20)]
        public virtual string TestCode { get; set; }

        [Required]
        [MaxLength(NVarcharLength30)]
        public virtual string TestName { get; set; }

        [MaxLength(NVarcharLength50)]
        public virtual string TestDesc { get; set; }
    }
	
	[AutoMap(typeof(Test))]
    public class TestUpdateDetailsDto
    {
        public string TestCode { get; set; }
        public string TestName { get; set; }
        public string TestDesc { get; set; }

        public int Id { get; set; }
    }

Hi,

Every time I run npm start, it gets stucked on 92% chunk asset optimization. It takes 3-4 mins. Do we have any setting or configuration so that it won't take much time?

We have support for localized string only on the client side, But If I want to send some exception to the client side, there is no support for localization. Do You have any approach for this?

Could you please suggest some good code review tools which can be integrated with Visual Studio 2017 for both C# and Angular ABP projects.

I am making an update API Call, but its updating CreationTime and CreatorUserId columns even If I'm not passing these values.

{
  "testCode": "string",
  "testName": "string",
  "testDesc": "string",
  "id": 1
}
public async Task UpdateTest(TestDetailsDTO input)
        {
            var classobj = ObjectMapper.Map<Test>(input);
            await UpdateAsync(classobj);
        }
public class TaxJurisdictionDetailsDTO : FullAuditedEntityDto
    {
        public string JurisdictionCode { get; set; }
        public string JurisdictionName { get; set; }
        public string JurisdictionDesc { get; set; }
    }

Parameter input gets CreationTime in UpdateTest service method.

Hi, I have some master data in DB which I need throughout my application. So What is the best way to define this data in the application? and Where should I define in the application so that every time applications starts I will initialize this master data in my application. And Where should I define the method which will fetch data from DB?

I'm thinking of having the dictionary in AppConsts.cs file in the Application project

I'm using [AbpAuthorize] with methods, so I'm not able to call methods from Swagger API. The reason is simple that user is not logged in, so Do we have any way to send login credentials from Swagger UI?

Or Do we have any way to have configurable [AbpAuthorize] based on some flag? So that for my development environment I can disable [AbpAuthorize] and in the live environment, I will enable [AbpAuthorize].

Showing 51 to 60 of 68 entries