Search results for query: *

  • Users: Ant6729
  • Content: Threads
  • Order by date
  1. A

    Is this possible to use IronPython .net with docx2pdf python package?

    I need to convert docx files to pdf files. Or bytes of docx file from a database to pdf file and download it. There is no free nuget packages to resolve my issue. But there is one package from python language I can use and it s name is docx2pdf. Nuget space has IronPython . net package, but this...
  2. A

    Linq for switch case.

    Is this possible to rewrite this with linq? var collection = await db.Clients.Where(element => element.ClientTypeId == 1 || element.ClientTypeId == 4 || element.ClientTypeId == 5 &&...
  3. A

    How could I optimize my filtering on the database side?

    Hello, guys! It is not a secret, that we need to filter data on the database side. But, I tried and did not find good solution to do this using IQueryable in my code. That is why I used some a data materialization syntax in several places, like ToList() . I would like to filtere on the database...
  4. A

    How to convert LINQ syntax with from and let in fluent variant?

    Hello, I write a query, like foreach (var deal in dealCollection) { foreach (var offer in deal.Offers) { if (offer.ClientId == testCurrentUserId) { if...
  5. A

    How to exclude objects from an array of objects by criteria.

    To be short: Have model: public class DealsOffersParcelsUnitedDto { public Guid? ShifterId { get; set; } [BsonElement("offers")] public List<Offer>? OfferCharacteristicsList { get; set; } public DealStatuses DealStatus { get; set; } public string...
  6. A

    How to update one by string field in mongo.

    I have work logic: var result45 = await _unitOfWork.Deal.UpdateOneAsync( new BsonDocument("_id", "f9097a32-23a7-4242-b34d-1a6d54c17e14"), new BsonDocument("$set", new BsonDocument("totalSum", 9999))); I have nowork logic: var result45 =...
  7. A

    Resolved Enums in Linq

    Hello, I try to refactor this var collection = new List<ShowOfCurrentEnum>(); foreach (var dealStatus in (DealStatuses[])Enum.GetValues(typeof(DealStatuses))) { var showCurrentEnum = new ShowOfCurrentEnum { Description...
  8. A

    Use LINQ syntax in a fluent style.

    Hello, I have such code: var collectionOfClientsDeals = new List<DealMonGoDto>(); foreach (var item in collectionOfDealsOfClient) { foreach (var element in item.Offers) { if...
  9. A

    Join collections into new one model by Id.

    Hello, everyone! I would like to add all cars, that were made by person into a new collection of new models. using System; using System.Collections.Generic; using System.Linq; namespace JoinListsIntoNewModel { public class Cars { public int Id { get; set; } public int...
  10. A

    Get first max value from collection of dictionaries with the help of linq

    Hello! I have output, like: [ { "serviceType": "MOVE", "directionCost": { "6ce50eb2-66cc-4581-a0fa-896454312ac7": 7000, "31a5d10d-db67-45d2-8efc-5b3f210a3bc0": 9265, "737212d9-cc3d-45bf-8c5e-43cad8f2f346": 8773...
  11. A

    Onion architecture

    Hello! I try to understand Onion And I just want this code https://dotnetfiddle.net/rtQ81E to be classified among different folders in my visual studio just to use it as an example in my future projects Could you help me to do it? And attach a RAR archive of this classified project in your...
  12. A

    Get only unique using mask

    Hello, csharpforumers)! private void button9_Click(object sender, EventArgs e) //???????? ????? ?????? ?? ?????(????, ????? ?????? ?????? ????? ?????????? ??????) { searchMask(listBox1); } void searchMask(ListBox listBox1) // ????? ?????? ?? ????? {...
  13. A

    How to delete from directory selected files in listbox

    Hello, everyone! I have a simple code private void button7_Click(object sender, EventArgs e) // ??????? ???????????? ?????????? ???????? ?????? ?? ???????? { ListBox.SelectedObjectCollection selectedItems = new ListBox.SelectedObjectCollection(listBox1)...
  14. A

    Get file name without path

    Hello everyone! I need to get only file name wit extension without path private void button9_Click(object sender, EventArgs e) { string rootFolder = @"C:\Users\Anton\Desktop\?#folder"; string pattern = @"\b(ArtId=[0-9]*)\b"; using (StreamWriter sw...
  15. A

    How to use path of the selected files to apply the Method to these selected files

    Hello, everyone!! A have a trouble... Because I want to apply method searchMask to the selected items by pushing button8. I dont understand, how to connect them, because I dont know how to get path of files in string rootFolder in searchMask method Could you help me with my challenge...
  16. A

    Regular expression

    Hello everyone! I have a string pattern string pattern = @"\b(TeNam=)\b[0-9]*|\b(PlNamOld = )\b|\b(SlsDaoFzg_T::dbUpdate:UPDATE Fzg_T)\b[0-9]*"; In this case \b(TeNam=)\b[0-9]* I need only TeNam= and digits, not TeNam= also - but only TeNam= and digits In this case \b(PlNamNeu =...
  17. A

    Add "date condition" to search files

    Hello! My code looks for txt files and prints lines containing the values of regular expressions specified in this code to the console. I would like to add a condition that allows me to search files for a specific date. I commented out my attempt.. using System; using...
  18. A

    How to find some different words in a string

    Hello I have a code And logicaly I want to write string pattern = @"\b(TeNam, Trrr, Tormnew)\b"; to find TeNam or Trrr or Tormnew in a string, but I dont know how to do it syntaxicaly using System; using System.Collections.Generic; using System.Linq; using System.Text; using...
  19. A

    Write target string in console using regular expressions

    Hello, everyone! I try to write in console only one string, that contains reg text, but my code writes all text from file Could you help me write my target string in console? Thanks! using System; using System.Collections.Generic; using System.Linq; using System.Text; using...
  20. A

    Read strings from files using mask and write them in txt file

    Hello! I am interested in 1) how to write strings in txt file There are many conditions in code to do so... 2) And my obstacle also is how to write strings with words like "Vas" or "Tim" using System; using System.Collections.Generic; using System.Linq; using System.Text; using...
Back
Top Bottom