public async Task Add(PermissionGroup permissionGroup, Guid _UserId) { repository.AddAndReturnObject <PermissionGroup>(ref permissionGroup); await repository.SaveChangesAsync(); await loggingService.LogActionData <PermissionGroup>(LoggingCategory.PermissionGroup, LoggingAction.Create, permissionGroup, null, _UserId, permissionGroup.Code.ToString()); }
public async Task Add(Admin admin, Guid _UserId) { //if (IsEmailUsedForAnotherAccount(admin.Email)) //{ // throw new Exception(ExceptionsTypes.EmailExists.ToString()); //} repository.AddAndReturnObject <Admin>(ref admin); await repository.SaveChangesAsync(); await loggingService.LogActionData <Admin>(LoggingCategory.Administrator, LoggingAction.Create, admin, null, _UserId, admin.Id.ToString()); }