https://stackoverflow.com/questions/63595993/how-to-pass-multiple-parameters-to-stored-procedure-on-net-core-3-1
asp.net core sp imp
https://ayende.com/blog/3955/repository-is-the-new-singleton;
if pass parameter value null pass like this
var parameters = new List<SqlParameter>();
if (string.IsNullOrEmpty(payload.Code) == false)
parameters.Add(new SqlParameter("@code", payload.Code));
else
parameters.Add(new SqlParameter("@code", DBNull.Value));
web api 2 to core:
System.Data.DbType to convert
System.Data.SqlDbType asp.net core
Severity Code Description Project File Line Suppression State
Error CS0029 Cannot implicitly convert type 'System.Collections.Generic.List<WebApplication11.Models.Address>' to 'Microsoft.AspNetCore.Mvc.ActionResult<WebApplication11.Models.Address>' FMSApiCore D:\Logicon\Angular\FMSAsp.NetCoreAPI\WebApplication11\Controllers\AddressesController.cs 61 Active
where condition issues
mostly getting issue due to list return in this change.
public async Task<ActionResult<IEnumerable<Address>>> GetAddress(long id)
model class as folde with IEnumerable imp this one
IEnumerable <Member> members= (IEnumerable<Member>)_memberRepository.GetMembers();
var result= members.Where(x => x.MemberType == memberType && x.IsActive == true).ToList();