Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Father I have sinned (against SOLID) or did I?

$
0
0

Hi all,

I am using this link

   IQueryable<Evraklar> BulunanEvraklar = _context.NumuneDetaylari.Where(e => e.KulakNo.Contains(ArananDeger)).Include(e => e.Evraklar).Select(e => e.Evraklar).Where(f => f.EnstituId == EnstituId).Where(f => f.date >= startdate).Where(f => f.date <= finisdate).OrderByDescending(f => f.EvraklarId);

and to make date interval out of order (search without date) I use this code below

  if (startdate == null) { startdate = DateTime.Parse("01.01.0001"); }
            if (finishdate == null) { finishdate = DateTime.Parse("01.01.3000"); }

instead of writing another link without date.

am I doing a big mistake performance wise?


Viewing all articles
Browse latest Browse all 1698

Trending Articles