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

Activities of "nmtoan07"

I don't know why we have RegisterToChanges method. I saw we code in this method for handle ObjectStateManagerChanged and update Audit fields. But I think maybe it was duplicated wth SaveChanges? Please explain for me.

Thanks,

Dear Mr.Hikalkan, May you explain for me about processing flow of Null Object Pattern, like example below: NullEventBus, EventBus When a class using EventBus, it can be initialize with EventBus= NullEventBus.Instance; But i can't understand how actually NullEventBus was replaced by EventBus instead of current NullEventBus. I was refer your document at: <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/EventBus-Domain-Events">http://aspnetboilerplate.com/Pages/Docu ... ain-Events</a> But i still don't understand how this possible, how did you replace NullEventBus with EventBus when method excuting...

  1. Maybe it was config somewhere?
  2. So when I create MyDemo and NullMyDemo, how can i implement Null Object pattern like you did?

Thanks and best regards, Toan

OK, fine! I will explain for this: First, repository is just for handler for each Table (in my opinions). But you must open connection first. Related to this:http://www.aspnetboilerplate.com/Pages/Documents/Unit-Of-Work If you want to open connection auto, mark method with [UnitOfWork] attribute. If you want to open connection by hand, inject IUnitOfWorkManager and implement by follow: Ex:

public void CreatePerson(CreatePersonInput input)
    {
        var person = new Person { Name = input.Name, EmailAddress = input.EmailAddress };
       
       //_unitOfWorkManager.Begin() will open connection
       using (var unitOfWork = _unitOfWorkManager.Begin())
        {
            _personRepository.Insert(person);
            _statisticsRepository.IncrementPeopleCount();

            unitOfWork.Complete();
        }
    }

Thanks for your reply. Could we define a solution for this, because i really want to use your current entities. I thought a solution: FlexibleTableNameAttribute : TableNameAttribute And in that attribute, we use a resource file for TableName, all table name will be handle in 1 file. When someone want to change TableName, it will be easier :D Currently, we don't know how many TableName existed in AbpFramework. With me, i must run update-database and see how many table in database to figure out.

Thanks and best regards

I have the same problem too... Anyone helps...

Hi, When program started, DI framework will collect all instance which IApplicationService implemented. The class inherited from IApplicationService will be used for your purpose. Ex: You have following: IExampleService: IApplicationService ExampleService: IExampleService If you don't call database, it doesn't have any problem. Service layer is separated with database.

Best regards

Showing 1 to 6 of 6 entries