I am trying to change the Abp prefix from table names. I am using the following method
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ChangeAbpTablePrefix<Tenant, Role, User>("");
}
It successfully renames all tables except
AbpPersistedGrants
I have an AppService that has an update method. I am receiving DateFrom and DateTo and I need to check if entered dates already exist in the database. Usually in aspnet boilerplate where do I perform that check? I want to keep AppServices simple without any database validation logic.
Thanks in advance
I am working on a scenario where I have the following entities with a many to many relationship:
public class Tutor
{
public int TutorId { get; set; }
public string Name { get; set; }
}
public class Student
{
public int StudentId { get; set; }
public string Name { get; set; }
}
public class TutorStudent
{
public int TutorId { get; set; }
public Tutor Tutor { get; set; }
public int StudentId { get; set; }
public Student Student { get; set; }
}
and the following Dtos
public class StudentDto
{
public int StudentId { get; set; }
public string Name { get; set; }
public IList<TutorDto> Tutors { get; set; }
}
public class StudentInputDto
{
public int StudentId { get; set; }
public string Name { get; set; }
public IList<int> SelectedTutors { get; set; }
}
public class TutorDto
{
public int TutorId { get; set; }
public string Name { get; set; }
}
I have two methods:
[HttpGet]
public async Task<StudentDto> UpdateStudent(EntityDto<int> input)
{
return student from database
}
[HttpPost]
public async Task UpdateStudent(StudentInputDto input)
{
if (input == null)
throw new NoDataSentException();
Student existingStudent = await (from student in studentRepository.GetAll()
.Include(x => x.Tutor)
where student.Id == input.Id
select student).SingleOrDefaultAsync();
ObjectMapper.Map(input, existingStudent);
await studentRepository.UpdateAsync(existingStudent);
}
The get method works but for the post how do I do the mapping to the many-to-many table?
Hi,
Iam using angular and aspnet core. Trying to change the position of toaster to bottom but it does no work. still shows top right
abp.notify.warn("Test message", "title", {
position: "bottom-start"
})
Hi,
I have the following code
Client newClient = await clientRepository.InsertAsync(clientInput);
return ObjectMapper.Map<ClientDto>(newClient);
I am trying to return the new id back to the client. But apparently the Id of the newClient is a huge number -9223372036854775000 which means that the row was inserted but for some reason the Id was not set in the Client object.
How can I overcome this issue?
Hi,
My solution has different modules. apart from aspnetzero dlls I created custom modules. The same stands for angular. I created lazy loaded modules that each one does not depend on it and each module is part of license paid by client. Depending on the modules the clients is paying for I want to deploy only on:
How can this be done with aspnet zero?
Since nobody is replying to github issue I am writing here for a major problem I have when I update to v7.0. I am using aspnet core with angular.
. I updated the aspnet core but I dont see my custom module appservices in the service.proxies.ts after I ran refresh.bat nor into the swagger ui. It seems that the appservices are not registered in router. I managed to get all routes of my solution. Not one route of the custom modules is present. What is the problem here? After upgrading to 7.0 this problem started happening
Thanks in advance
Hi,
EntityCache is a singleton class. I saw the code of abp and noticed that a IRepository is injected into EntityCache. Since entitycache is singleton and dependency is scoped these would lead to captive dependency and even worse the same repository instance will be used by whatever other service is registered as singleton and uses that repository. Eventually this would cause bigger problems since dbcontext is not thread safe.
Can you advise?
Thanks
How are classes marked as singleton are initialized? Which scope do they use to be created?
Thanks in advance
I have a class Client that inherits from Entity. By default it created the Class with an Id property. I want to override the default naming and make it ClientId. Is that possible?
Thanks