Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Hi @ismcagdas,
We are developing Flutter mobile app via using aspnetzero as backend api. Now we want to add chat and push notification functions on flutter. Could you give us some suggestions or links to reference ? I would appreciate your assistance with this matter.
Hi ismcagdas,
There have also other bugs. It is still showing error NameValueOfString in DemoUiSelectionComponent. Why service not auto generate this classes EntityDtoOfString,ListResultDtoOfOrganizationUnitDto,EntityDtoOfInt64,PagedResultDtoOfNameValueDto,EntityDtoOfGuid?
Thanks
"version": "11.1.0", Angular net core
Hi Team, My service side is all ok. Swagger browsing is ok. Then I run refresh.bat in command prompt. It is also ok. I created entity using power tool is nice in service-proxies file. I try it again and again. It is showing same error. But after i run npm start in VS code, it is showing me the following bugs.
./src/app/shared/layout/nav/menu-search-bar/menu-search-bar.component.ts:47:35-52 - Error: export 'NameValueOfString' (imported as 'NameValueOfString') was not found in '@shared/service-proxies/service-proxies' ./src/app/shared/layout/notifications/UserNotificationHelper.ts:123:26-41 - Error: export 'EntityDtoOfGuid' (imported as 'EntityDtoOfGuid') was not found in '@shared/service-proxies/service-proxies' Error: src/app/admin/demo-ui-components/demo-ui-selection.component.ts:4:40 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'NameValueOfString'.
4 import { DemoUiComponentsServiceProxy, NameValueOfString } from '@shared/service-proxies/service-proxies'; ~~~~~~~~~~~~~~~~~ Error: src/app/admin/maintenance/maintenance.component.ts:4:31 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'EntityDtoOfString'.
4 import { CachingServiceProxy, EntityDtoOfString, WebLogServiceProxy } from '@shared/service-proxies/service-proxies'; ~~~~~~~~~~~~~~~~~ Error: src/app/admin/organization-units/organization-tree.component.ts:4:5 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'ListResultDtoOfOrganizationUnitDto'.
4 ListResultDtoOfOrganizationUnitDto, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: src/app/admin/tenants/tenants.component.ts:9:5 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'EntityDtoOfInt64'.
9 EntityDtoOfInt64, ~~~~~~~~~~~~~~~~
Error: src/app/admin/users/edit-user-permissions-modal.component.ts:4:5 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'EntityDtoOfInt64'.
4 EntityDtoOfInt64, ~~~~~~~~~~~~~~~~ Error: src/app/admin/users/users.component.ts:7:5 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'EntityDtoOfInt64'.
7 EntityDtoOfInt64, ~~~~~~~~~~~~~~~~
Error: src/app/admin/webhook-subscription/create-or-edit-webhook-subscription-modal.component.ts:6:5 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'NameValueOfString'.
6 NameValueOfString, ~~~~~~~~~~~~~~~~~
Error: src/app/shared/common/lookup/common-lookup-modal.component.ts:4:24 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'PagedResultDtoOfNameValueDto'.
4 import { NameValueDto, PagedResultDtoOfNameValueDto } from '@shared/service-proxies/service-proxies'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: src/app/shared/layout/nav/menu-search-bar/menu-search-bar.component.ts:2:10 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'NameValueOfString'.
2 import { NameValueOfString } from '@shared/service-proxies/service-proxies'; ~~~~~~~~~~~~~~~~~
Error: src/app/shared/layout/notifications/UserNotificationHelper.ts:4:5 - error TS2305: Module '"@shared/service-proxies/service-proxies"' has no exported member 'EntityDtoOfGuid'.
So that, i have been checked with service-proxies file of old project. Old file have export class NameValueOfString implements INameValueOfString { name!: string | undefined; value!: string | undefined; .. .. }
export interface INameValueOfString { name: string | undefined; value: string | undefined; }
Current file export class NameValue_1OfOfStringAndCoreLibAnd_0AndCulture_neutralAndPublicKeyToken_7cec85d7bea7798e implements INameValue_1OfOfStringAndCoreLibAnd_0AndCulture_neutralAndPublicKeyToken_7cec85d7bea7798e { name!: string | undefined; value!: string | undefined; .. .. }
export interface INameValue_1OfOfStringAndCoreLibAnd_0AndCulture_neutralAndPublicKeyToken_7cec85d7bea7798e { name: string | undefined; value: string | undefined; }
Why its happen?
Please help me. Thanks all
Hi @ismcagdas
It's ok now. Thanks million. Great team and support.
Thanks all
HI ismcagdas
I have already sent db file to your reference email. Please check it.
Thanks
HI ismcagdas
Our view is bit complicated and need many table to create. I have already sent. Please check.
Thanks
HI ismcagdas I have already sent project file to your reference email. Please check it.
Thanks
"version": "11.1.0", Angular net core
I have a sql view which use old project. Now i use that sql server view in asp.net zero project. I wrote customize repository like you reference. Then I run project. It is ok in server. The server reterive datas depend view query. But there is showing "An internal error occurred" message in frontend angular. I have alreay debug on server side. Serverside is ok. Please help me. You can see my codes. I'm looking forward your answer.
application.shared layer
public class viewReservationFolio : CreationAuditedEntity<Guid>
{
......
}
public class InputSearch : PagedAndSortedResultRequestDto
{
....
}
EntityFrameworkCore Layer
public class ReservationRepository : BEZNgCoreRepositoryBase<viewReservationFolio, Guid>, IReservationRepository
{
private readonly IActiveTransactionProvider _transactionProvider;
public ReservationRepository(IDbContextProvider<BEZNgCoreDbContext> dbContextProvider, IActiveTransactionProvider transactionProvider)
: base(dbContextProvider)
{
_transactionProvider = transactionProvider;
}
public async Task<List<viewReservationFolio>> GetViewReservationFolio(InputSearch input)
{
var sqlText = QueryText(input);
var result = new List<viewReservationFolio>();
if ((input.IsCompany == false && input.IsGroup == false) || (input.IsCompany == true && input.IsGroup == true && input.IsCancel == false && input.IsPending == false && input.IsNoShow == false &&
input.IsReservation == false && input.IsHouse == false && input.IsCheckOut == false))
{
result = new List<viewReservationFolio>();
}
else
{
await EnsureConnectionOpenAsync();
var arams = GetParameterValue(input);
using (var command = CreateCommand(sqlText, CommandType.Text, arams))
{
using (var dataReader = await command.ExecuteReaderAsync())
{
try
{
while (await dataReader.ReadAsync())
{
viewReservationFolio v = new viewReservationFolio();
........
result.Add(v);
}
dataReader.Close();
}
catch (Exception ex)
{
throw ex;
}
}
}
await EnsureConnectionCloseAsync();
}
return result;
}
Core Layer
public interface IReservationRepository : IRepository<viewReservationFolio, Guid>
{
Task<List<viewReservationFolio>> GetViewReservationFolio(InputSearch input);
}
Application Layer
[AbpAuthorize(AppPermissions.Pages_Reservations)]
public class ReservationAppService : BEZNgCoreAppServiceBase, IReservationAppService
{
private readonly IApplicationLanguageManager _applicationLanguageManager;
..........................
public ReservationAppService(
IApplicationLanguageManager applicationLanguageManager,
...................)
{
_applicationLanguageManager = applicationLanguageManager;
.....
}
public async Task<List<StayDateDto>> GetStayDate()
{
}
public async Task<PagedResultDto<GetReservationFolioDto>> GetViewReservationFolioToday(InputSearch input)
{
var vw = _reservationRepository.GetViewReservationFolio(input);
var pagedAndFilteredRegistration = vw.Result.AsQueryable();
pagedAndFilteredRegistration=pagedAndFilteredRegistration.OrderBy(input.Sorting ?? "CheckInDate,DocNo asc").PageBy(input);
var totalCount = pagedAndFilteredRegistration.Count();
var dbList = pagedAndFilteredRegistration.ToList();
var results = new List<GetReservationFolioDto>();
foreach (var o in dbList)
{
var res = new GetReservationFolioDto()
{
GetViewResFolio = ObjectMapper.Map<viewReservationFolioDto>(o)
};
results.Add(res);
}
return new PagedResultDto<GetReservationFolioDto>(
totalCount,
results
);
}
Note: results list incluse datas.
Log File
INFO 2022-05-23 01:20:11,930 [orker] osoft.EntityFrameworkCore.Infrastructure - Entity Framework Core 6.0.0 initialized 'BEZNgCoreDbContext' using provider 'Microsoft.En ERROR 2022-05-23 01:20:21,678 [orker] Mvc.ExceptionHandling.AbpExceptionFilter - This SqlTransaction has completed; it is no longer usable. System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.
INFO 2022-05-23 01:20:21,691 [orker] c.Infrastructure.ControllerActionInvoker - Executed action BEZNgCore.Reservations.ReservationAppService.GetViewReservationFolioToday (BEZNgCore.Application) in 11899.6915ms INFO 2022-05-23 01:20:21,691 [orker] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'BEZNgCore.Reservations.ReservationAppService.GetViewReservationFolioToday (BEZNgCore.Application)' INFO 2022-05-23 01:20:21,691 [orker] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished HTTP/2 GET https://localhost:port/api/services/app/Reservation/GetViewReservationFolioToday?Filter=&StayDate=default&IsReservation=true&IsHouse=true&IsCheckOut=true&IsCompany=true&IsGroup=true&FirstName=&LastName=&RoomNo=&FolioNo=&CompanyName=&GroupName=&VoucherNo=&TelNo=&MobileNo=&Email=&Passport=&RateCode=&LoyaltyNo=&AccNo=&PostalCode=&GDS=&Group1Key=&Group2Key=&Group3Key=&Group4Key=&RateTypekey=&Sorting=&SkipCount=0&MaxResultCount=10 - - - 500 207 application/json;+charset=utf-8 11953.9042ms INFO 2022-05-23 01:20:23,974 [orker] osoft.EntityFrameworkCore.Infrastructure - Entity Framework Core 6.0.0 initialized 'BEZNgCoreDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.0' with options: None
Frontend https://localhost:port/api/services/app/Reservation/GetViewReservationFolioToday?.. {"result":null,"targetUrl":null,"success":false,"error":{"code":0,"message":"An internal error occurred during your request!","details":null,"validationErrors":null},"unAuthorizedRequest":false,"__abp":true}
Hi Sir,
Any updates ?
Thanks
<div [@routerTransition]>
<div class="content d-flex flex-column flex-column-fluid" style="background-color:azure">
<div [class]="containerClass">
<div class="row">
<div class="col-4">
<h3 class="card-title align-items-start flex-column">
<span class="font-weight-bolder text-dark">
ROUTE (MAX. 20 STOPS)
</span>
</h3>
<div class="card card-custom gutter-b">
<div class="card-body">
<div class="form-group m-form__group">
<label for="PickupLocation">{{ l('Pick Up Location') }}</label>
<div class="input-group">
<input
class="form-control"
id="PickupLocation"
name="pickupLocation"
[(ngModel)]="pickupLocation"
type="text"
(ngModelChange)="modelChangeFn($event)"
(keydown.enter)="$event.preventDefault()" placeholder="Enter address" autocorrect="off"
autocapitalize="off" spellcheck="off" #search
/>
<input class="form-control" name="latitude" [(ngModel)]="latitude" type="text" hidden />
<input class="form-control" name="longitude" [(ngModel)]="longitude" type="text" hidden/>
<!-- <validation-messages [formCtrl]="addressInput"></validation-messages> -->
<div class="input-group-append">
<button class="btn btn-primary blue" (click)="openPickupInfoModal()" type="button" [disabled]="pickInfoBtn">
<i class="fa fa-search"></i> {{ l('Pickup Info') }}
</button>
</div>
<div class="input-group-prepend">
<button class="btn btn-danger btn-icon" type="button" (click)="setPickupNull()">
<i class="fa fa-times"></i>
</button>
</div>
</div>
</div>
<!-- class="card-body" -->
<div *ngIf="pickupOk" [perfectScrollbar]>
<div class="table-responsive">
<!--begin::Table-->
<table class="table">
<!--begin::Thead-->
<thead>
<tr>
<td class="m-widget11__label">Address</td>
<td class="m-widget11__app">Name</td>
<td class="m-widget11__sales">Phone Number</td>
<td class="m-widget11__change">Floor/House/Room</td>
<td class="m-widget11__label"></td>
</tr>
</thead>
<!--end::Thead-->
<!--begin::Tbody-->
<tbody>
<tr *ngFor="let p of pickupList; let i = index">
<td>{{p.address}}</td>
<td>{{p.name}}</td>
<td>{{p.phoneNumber }}</td>
<td>{{p.floorHouseRoom }}</td>
<td>
<button class="btn btn-danger btn-icon" type="button" (click)="remove(i,p)">
<i class="fa fa-times"></i>
</button></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="col-6">
<agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="zoom" style="height:100%;width: 100%;">
<agm-marker [latitude]="latitude" [longitude]="longitude" [markerDraggable]="true"
(dragEnd)="markerDragEnd($event)"></agm-marker>
</agm-map>
</div>
</div>
</div>
</div>
<frontpagePickupInfoLookupTableModal #frontpagePickupInfoLookupTableModal (modalSave)="getDeliveryInfo()"></frontpagePickupInfoLookupTableModal>
</div>