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

Activities of "manojreddy"

Thanks for your response.

Link appsettings.json is giving 404. [https://github.com/aspnetzero/aspnet-zero-core/blob/67b8cdd1542e2cdfef982b08a886df2f6c7c1e56/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Host/appsettings.json#L13])

Thanks for your reply, it works perfectly.

I'm not able to get the key (allowSwaggerToRunAPIs ) value from the app.config file in Startup.cs file. I want to make this as configurable.

<configuration>
  <appSettings>
    <add key="owin:AutomaticAppStartup" value="false"/>
    <add key="allowSwaggerToRunAPIs" value="true"/>
  </appSettings>
  <runtime>
      <gcServer enabled="true"/>
   </runtime>
</configuration>

If let's say I have a deleted a row, again create a row with same unique index attribute. Now If I again delete the record it will give an error. So How can We solve this issue?

Thanks a lot @aaron

@ismcagdas

Any update?

Please find the code below.

public interface ITestRepository : IRepository<Test, int>
    {
        PagedResultDto<FetchTest> GetSearchTest(FetchTestInput searchInput);

        Task<int> CreateTest(TestDetailsDTO input);

        Task UpdateTest(TestDetailsDTO input);

        TestDetailsDTO GetTestDetailsforEdit(EntityDto input);

        Task DeleteTest(EntityDto input);

        ListResultDto<FetchTest> GetTestList(string input);

    }
public class TestRepository : TestRepositoryBase<Test, int>, ITestRepository
    {
        private readonly IActiveTransactionProvider _transactionProvider;
        public TestRepository(IDbContextProvider<TestDbContext> dbContextProvider)
            : base(dbContextProvider)
        {
        }

        public TestRepository(IDbContextProvider<TestDbContext> dbContextProvider,
            IActiveTransactionProvider transactionProvider, IObjectMapper objectMapper)
        : base(dbContextProvider)
        {
            _transactionProvider = transactionProvider;
            ObjectMapper = objectMapper;
        }

        public async Task<int> CreateTest(TestDetailsDTO input)
        {

            int TestId = await InsertAndGetIdAsync(ObjectMapper.Map<Test>(input));

            return TestId;

        }

        public async Task DeleteTest(EntityDto input)
        {
            await DeleteAsync(input.Id);
        }

        public PagedResultDto<FetchTest> GetSearchTest(FetchTestInput searchInput)
        {
            var _Tests = GetAll()
                .Where(f => (!string.IsNullOrWhiteSpace(searchInput.TestCode) ? f.TestCode.Contains(searchInput.TestCode) : true) &&
                            (!string.IsNullOrWhiteSpace(searchInput.TestDesc) ? f.TestDesc.Contains(searchInput.TestDesc) : true));

            var _result = (from details in _Tests
                           select new FetchTest
                           {
                               Id = details.Id,
                               TestCode = details.TestCode,
                               TestDesc = details.TestDesc,
                               TestName = details.TestName,
                               AbcCode = details.AbcCode
                           });

            var TestCount = _result.Count();
            var Tests = ObjectMapper.Map<List<FetchTest>>(_result
            .OrderBy(searchInput.Sorting)
            .PageBy(searchInput)
            .ToList());

            return new PagedResultDto<FetchTest>(
                 TestCount,
                 Tests
                );
        }

        public TestDetailsDTO GetTestDetailsforEdit(EntityDto input)
        {
            var result = (from Test in GetAll()
                          where ((Test.Id == input.Id))

                          select new TestDetailsDTO
                          {
                              TestCode = Test.TestCode,
                              TestName = Test.TestName,
                              TestDesc = Test.TestDesc,
                              AbcCode = Test.AbcCode
                          });

            int count = result.Count();

            return ObjectMapper.Map<TestDetailsDTO>(result.FirstOrDefault());
        }

        public ListResultDto<FetchTest> GetTestList(string input)
        {
            var Tests = GetAll()
                             .Where(a => (a.Id.ToString().Equals(input) || a.TestCode.Contains(input) || a.TestDesc.Contains(input)));

            return new ListResultDto<FetchTest>(ObjectMapper.Map<List<FetchTest>>(Tests));
        }

        public async Task UpdateTest(TestDetailsDTO input)
        {
            var classobj = ObjectMapper.Map<Test>(input);
            await UpdateAsync(classobj);
        }
    }

Hi,

Thanks for reply.

Do we have library like nswag which generates proxy file as per my requirement?.

Thanks

Hi,

Thanks for your reply.

I'm not able to get the entity from DB as well, please share the code.

Showing 191 to 199 of 199 entries