Friday, 15 April 2022

list of c# issues

 list of c# issues

call multiples table at a time and save also

and one model have another model list .

mapping mulitple models in the list


https://www.aspsnippets.com/questions/181267/Copy-items-from-one-List-to-another-List-without-foreach-using-Entity-Framework-in-Linq-Query-using-C-in-ASPNet/


https://stackoverflow.com/questions/12715620/how-do-i-return-multiple-result-sets-with-sqlcommand


https://www.sqlservertutorial.net/sql-server-indexes/sql-server-clustered-indexes/


https://www.includehelp.com/dot-net/list-t-addrange-method-with-example-in-c-sharp.aspx

Easy to map different set of list by linq without for loop

https://www.learndapper.com/relationships


core issues 

when using .tolist not able to access the key value

bcz of using .tolist(). so then i used firstordefault()


 var resendotp = _context.Members.Where(x => x.IsActive == true && x.UserId== userMerber.UserId).FirstOrDefault();

                if (DateTime.Now > resendotp.OtpsentDate.Value.AddMinutes(5))


here if we use tolist result will be differenct so used firstordefault





No comments:

Post a Comment

remove duplicates in an sorted array

  using System; public class HelloWorld {          public static void Main(string[] args)     {         int[] ar={2,2,3,3,4,6,6};          C...