Thursday, 28 March 2024

icons

 https://appery.io/account/resources/img/confirm-page-icon.svg


Ionic Projects

 IOnic apps

https://github.com/ionic-team/ionic-conference-app


https://github.com/alanmontgomery/ionic-ecommerce-example/blob/main/src/pages/CartProducts.js


https://github.com/alanmontgomery/ionic-fast-food-app?tab=readme-ov-file


https://github.com/alanmontgomery/ionic-restaurant-finder

https://github.com/alanmontgomery/ionic-pinterest-floating-tab-bar


Tuesday, 26 March 2024

Pages,component or controllers names

 angular service name:

  1. AlertService: If the service is responsible for displaying alerts, notifications, or messages throughout your application.

  2. NotificationService: Similar to AlertService, this name suggests that the service handles notifications or messages.

  3. ToastService: If the service is specifically focused on displaying toast messages or notifications.

  4. UtilityService: If the service provides various utility functions or helper methods that are used across multiple components.

  5. CommonService: This name implies that the service contains common functionality used across different parts of the application.

  6. GlobalDataService: If the service manages global data or state that needs to be shared across components.

  7. SharedService: This name indicates that the service contains functionality or data shared among multiple components.

  8. AppService: A generic name that implies the service is a core part of the application.

  9. MessageService: If the service is primarily responsible for sending or handling messages within the application.

  10. InteractionService: This name suggests that the service facilitates interaction between different parts of the application.

Monday, 25 March 2024

Linq concepts

To Handle large amount 

Parllel Programming in c#

link


https://code-maze.com/csharp-how-to-divide-data-into-batches-with-linq/

Angular create page cmd

  ng g m user-admin --route user-admin --module app

Sunday, 24 March 2024

Join two tables and filter

 SELECT * FROM (

SELECT ArchiveAppraisalID, OriginalAppraisalID, AppraisalType, EmpNumber, (A.FIRST_NAME + ',' + A.LAST_NAME) AS EmpName FROM Reports.Appraisals B JOIN tbl_HRITMasterData A ON A.EMPLOYEE_NUMBER = B.EmpNumber UNION ALL SELECT B.ArchiveMidYear AS ArchiveAppraisalID, B.OriginalMidYearID As OriginalAppraisalID, B.AppraisalType, B.EmpNumber, (A.FIRST_NAME + ',' + A.LAST_NAME) AS EmpName FROM Reports.MidYear B JOIN tbl_HRITMasterData A ON A.EMPLOYEE_NUMBER = B.EmpNumber ) AS CombinedData WHERE (@SearchName IS NULL OR (EmpName LIKE '%' + @SearchName + '%'));

Saturday, 23 March 2024

same table data to different schema

To insert data from one schema's table into another schema's table in Microsoft SQL Server, you can use a simple INSERT INTO...SELECT statement. Here's the basic syntax:

INSERT INTO TargetSchema.TargetTable (Column1, Column2, ...)

SELECT Column1, Column2, ...

FROM SourceSchema.SourceTable;



blazor radzon add in project steps

 https://blazor.radzen.com/docs/guides/getting-started/installation.html

Wednesday, 13 March 2024

convert list issues

 Severity Code Description Project File Line Suppression State

Error CS0266 Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<Enviri.SharedLibrary.Models.TblVendor>' to 'System.Collections.Generic.List<Enviri.SharedLibrary.Models.TblVendor>'. An explicit conversion exists (are you missing a cast?) Enviri.PO.WebUI C:\MyFiles\Harsco\CORP_POC\Enviri.PO\Enviri.PO.WebUI\Enviri.PO.WebUI\Implementations\VendorRepository.cs 25 Active
ChatGPT
ChatGPT

The error message CS0266 indicates that you are trying to implicitly convert an IEnumerable<T> to a List<T>, but there's no implicit conversion available between these types. You need to perform an explicit conversion to resolve this issue.

Here's how you can fix it:

csharp
public async Task<List<TblVendor>> GetAllVendors() { var vendors = await _context.TblVendors.ToListAsync(); return vendors; }

In this corrected version:

  • The ToListAsync() method is used to asynchronously retrieve all vendors from the database and materialize them into a list.
  • The method now returns a List<TblVendor> instead of an IEnumerable<TblVendor>.

This should resolve the compilation error you're encountering.

User
You
async Task<List<TblVendor>> IVendorRepository.GetAllVendorsAsync() { using (IDbConnection db = _dapperDbConnection.CreateConnection()) { return await db.QueryAsync<List<TblVendor>>("SELECT * FROM [tbl_Vendors]"); } }
ChatGPT
ChatGPT

The issue in your code is that you're trying to use QueryAsync<List<TblVendor>>, which expects a single List<TblVendor> as a result. However, you're selecting all columns from the table, which would return multiple rows, not a single list.

To fix this, you should use QueryAsync<T> instead, where T is the type of each row in your result set (TblVendor in this case). Here's how you can correct your code:

csharp
using Dapper; async Task<List<TblVendor>> IVendorRepository.GetAllVendorsAsync() { using (IDbConnection db = _dapperDbConnection.CreateConnection()) { return (await db.QueryAsync<TblVendor>("SELECT * FROM [tbl_Vendors]")).ToList(); } }

In this corrected version:

  • We use QueryAsync<T> instead of QueryAsync<List<TblVendor>>.
  • QueryAsync<T> expects the type of each row (TblVendor in this case) and will return an IEnumerable<TblVendor>. We then call ToList() to materialize the result into a List<TblVendor>.

This should resolve the issue, and now your method will correctly return a list of TblVendor objects.

7 Common mistakes in Dot Net — You can avoid

  There are many common mistakes made during .NET (ASP.NET, .NET Core) development, which affect performance, security, and code… Code Crack...