Can you please guide how to integrate asp.net xero code with Docker.
public class PayrollManager : ApplicationServiceBase, IDomainService
{
public SalarySheet CreateSalary(int employeeCode,int periodId, int month, int year)
{
SalaryPeriod salaryPeriod = _salaryPeriodRepository.FirstOrDefault(x => x.Id == periodId);
int startDay = salaryPeriod.FromDate.Day;
int endDay = salaryPeriod.ToDate.Day;
decimal daysRemoval = _timeCardDetailCustomRepository.CalculateDaysremoval(startDate, endDate, employeeCode);
}
}
//Custom Repository
public class TimeCardDetailRepository : ApplicationRepositoryBase<TimeCardDetail>,ITimeCardDetailRepository
{
IConfigurationRoot configuration = AppConfigurations.Get(WebContentDirectoryFinder.CalculateContentRootFolder(), addUserSecrets: true);
public TimeCardDetailRepository(IDbContextProvider<ApplicationContext> dbContextProvider)
: base(dbContextProvider)
{
}
public decimal CalculateDaysremoval(DateTime startDate,DateTime endDate,int employeeCode)
{
string sql = "SELECT ISNULL(SUM(CASE WHEN mark = 1 and TotalHours >= 4 THEN 0.5 WHEN mark = 1 and TotalHours < 4 THEN 1 end),0)as removalDays FROM dbo.tabel WHERE EID = @employeeId";
decimal result = 0;
using (var con=GetDbContext().Database.GetDbConnection())
{
using (var command = con.CreateCommand())
{
command.CommandText = sql;
command.Parameters.Add(new SqlParameter("@employeeId", employeeCode));
using (var dr = command.ExecuteReader())
{
if (dr.Read())
{
result = Convert.ToDecimal(dr["removalDays"]);
}
}
}
}
return result;
}
}
It throws this exception.
My Question is that how can we Pass the transection from Domain Service to Custom repository Method ? In Cutome repository method we want to use Pure Ado.net because we have a alot of views from getting data and we can not map every view to EF Core keyless Entity type.
As Domain Services already Implemnet UnitOfWork by default in ABP and we jsut want to pass the transection used by UnitOfWork in Cutom repo methods or any work around to implement this behaviour?
I'm using my own components instead of using default modal component for edit and create.But I'm getting Attempt to use a destroyed view error only when I go for editing. I'm using this code to get my component for edit. this.router.navigate(['/app/admin/employees/Edit',id]);
please help me in solving my issue. Thanks alot.
!
we dont want to complicate login process for the user, please guide how can we autoselect the tenant on the basis of user login?
In case of change in already generated entities, When we regenerate entities from RAD Power Tool, our customization and validation are overwritten, how to retain our customization?