c# - Proper use of StartWith and Contains in Entity Framework -
I remove the prefixes from the Linq links in the
field I want> query
> Query 2 Unfortunately we do not take string parameters as a result of Thank you.
var objRetailer = From store in context. Join ReetailerStoredtls to join the reference Retailer Contact Dtls at stores. ReetailerID is equal to ret.RetailerID stores on context.RetailerRegDates. ReetailerID equals retreg.RetailerRegDateId where (stores.IsDeleted == zero) stores.Is deleted == incorrect) & amp; Amp; (Stores ready Date Price Year == iYear || stores.ModifiedDate.Value.Year == iYear) & amp; Amp; Retreg.IsAprproved == The right orderbay stores. Select store name new {store.StoreID, store = stores} Store name, area = stores Storecity, zip = stores. Store Zip, Selling Card = (Stores. Ritter ID.Value)? True: False) StoreWithoutPrefix = stores.StoreName.StartsWith (& lt; Question 1 & gt; One of the prefixes in stores. Store name: & lt; stores.StoreName without prefix & gt;};
.startwith ()
which Query1 , if I go with .
does will not check whether it starts with it or not, just check whether the string exists or not. What should you do to complete this task?
You can use IndexOf
, but you probably have problems with the sensitivity of the matter, so add a parameter option to select .gnomecase
Comments
Post a Comment