Skip to content

.NET (Core and Framework)

Discussions on the .NET Core, .NET Framework and .NET 5 frameworks

This category can be followed from the open social web via the handle .net-core-and-framework@forum.codeproject.com

10.2k Topics 32.0k Posts
  • difference between api and web services

    wcf json
    6
    0 Votes
    6 Posts
    2 Views
    S
    API API is the acronym for Application Programming Interface. It is a software interface that allows two applications to interact with each other without any user intervention. APIs provides product or service to communicate with other products and services without having to know how they're implemented. Web Service A Web service is a collection of open protocols and standards which are widely used for exchanging data between systems or applications. Software applications are written using various programming languages and running on multiple platforms. It allows you to use web services to exchange data over computer networks.
  • Resource Error

    html help learning workspace
    4
    0 Votes
    4 Posts
    6 Views
    J
    If you are trying to run a program using a .dll file extension. I'm sorry it doesn't work that way. You need an executable (*.exe) to start a process. However; if you want to use the functionality of the .dll file. What you can do is add it to your project reference and check the exposed API/Class helper so you can get started with it. Hopes this helps you. Thanks.
  • c# forms (holy crap i'm not ready for this)

    csharp php database help
    19
    0 Votes
    19 Posts
    25 Views
    U
    wait a second I used this DataTable returnTable = new DataTable(); DataColumn dtColumn; DataRow dataRow; MessageBox.Show(fieldCount.ToString()); for (int i = 0; i <= (fieldCount - 1); i++) { //MessageBox.Show(sqlite\_datareader.GetDataTypeName(i)); switch (sqlite\_datareader.GetDataTypeName(i)) { case "TEXT": dtColumn = new DataColumn(); dtColumn.DataType = typeof(String); dtColumn.ColumnName = sqlite\_datareader.GetName(i); returnTable.Columns.Add(dtColumn); break; case "INTEGER": dtColumn = new DataColumn(); dtColumn.DataType = typeof(Int32); dtColumn.ColumnName = sqlite\_datareader.GetName(i); returnTable.Columns.Add(dtColumn); break; } } for (int j = 0; sqlite\_datareader.Read(); j++) { for (int k = 0; (k <= fieldCount - 1); k++) { MessageBox.Show(sqlite\_datareader.GetDataTypeName(k)); MessageBox.Show(sqlite\_datareader.GetName(k)); switch (sqlite\_datareader.GetDataTypeName(k)) { case "TEXT": dataRow = returnTable.NewRow(); dataRow\[sqlite\_datareader.GetName(k)\] = sqlite\_datareader.GetString(k); returnTable.Rows.Add(dataRow); //returnTable.Rows.Add(sqlite\_datareader.GetString(k)); break; case "INTEGER": dataRow = returnTable.NewRow(); dataRow\[sqlite\_datareader.GetName(k)\] = sqlite\_datareader.GetInt32(k); returnTable.Rows.Add(dataRow); //returnTable.Rows.Add(sqlite\_datareader.GetString(k)); break; } } \*/ to try to load the query into a datatable (unsuccessfully, datatype problems), and you can just use .load()? That was a day well wasted
  • Coding Hacking Spamming

    question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • what is tuple in mvc

    question asp-net architecture
    4
    0 Votes
    4 Posts
    6 Views
    S
    So Tuple is a good thing. It is very useful in scenarios where you need to return multiple values from a method but do not intend to create a dedicated DTO for that sole purpose. It is not of structure type either which means it is passed by reference. I created 2 methods in my controller for testing Tuple - one for Get and other for Post. [HttpGet] public ActionResult TestTuple() { Tuple t = new Tuple("test", 123); return View(t); } \[HttpPost\] public ActionResult TestTuple(Tuple tuple) { return new EmptyResult(); } The view part is straightforward: @model Tuple @{ ViewBag.Title = "TestTuple"; } @Html.BeginForm("TestTuple", "Home", FormMethod.Post){ @Html.EditorFor(m => m); input type="submit" value="Test Tuple"/ }
  • How to know which Id belongs to which object?

    tutorial question database help
    7
    0 Votes
    7 Posts
    2 Views
    S
    Thank you Deeming - thanks a lot my friend :)
  • Totokita2 Agen Togel Terpercaya

    com game-dev
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • 0 Votes
    3 Posts
    2 Views
    B
    Just ditch question mark in front of FirstOrDefault.
  • real us passport

    com
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Website designing in Delhi

    mobile com design
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    3 Posts
    2 Views
    Richard DeemingR
    The conventions don't understand that you wanted UserId to be the foreign-key column for the ApplicationUser navigation property. As a result, EF assumes that UserId is just a standard string column, which is not connected to anything. It added the ApplicationUser_Id column to serve as the foreign-key link for the ApplicationUser navigation property. Code First Conventions - EF6 | Microsoft Docs[^] For the conventions to work, you'd either need to rename the UserId property to ApplicationUserId, or rename the ApplicationUser property to User. If you can't rename either property, you need to use data annotations or the fluent API to configure your foreign key relationship correctly. For example: [Required] [Index("IX_UniqueConstraintCaseAssignedToInvestigator", 2, IsUnique = true)] [MaxLength (128)] [ForeignKey(nameof(ApplicationUser))] // <-- Add this attribute public string UserId { get; set; } public ApplicationUser ApplicationUser { get; set; } Or: modelBuilder.Entity<CaseAssignedToInvestigator>() .HasOne(case => case.ApplicationUser) .WithMany() // Or: .WithMany(user => user.Cases) .HasForeignKey(case => case.UserId); Code First Data Annotations - EF6 | Microsoft Docs[^] Fluent API - Relationships - EF6 | Microsoft Docs[^] "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • 0 Votes
    10 Posts
    3 Views
    W
    I need to set this source code on my new project. You can see my project and give me the reviews about it.
  • Invalid object name 'dbo.CaseAssignedToInvestigators1'

    help announcement
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Best way to remotely send/retrieve data (securely)

    csharp php mysql xml
    3
    0 Votes
    3 Posts
    7 Views
    U
    oh believe me I know. But network (lan) traffic can still be intercepted, packet sniffed, and if unencrypted, exploited. I'm now looking into possibly mysql over SSH. Disadvantage of course is the app must have the SSH username/password as program variables, which can be extracted. Vs direct MySQL, which you can just have a person login with their own mysql username and password. Is there any way to disassociate SSH with the filesystem/console and just mysql is there any better way than using XML/SSH for over the internet (yes, not lan). As i'm still not sure if I should do this lan or internet. This is a computer repair management software, i'm going to initially write it for myself, and maybe later release it, i'm not sure free or pay. If I use an internet web connector, I can enable a payment system for peoples accounts, but if thier internet is out, they can't use it. Lan, they can. i'm also considering using studio 2012, as the mysql connector does not work in 2008 (says "system cannot find the reference specified") and as much as i've learned vb.net a few years back, c#.net seems to be closer to PHP, my long learned language. Might consider learning c#
  • Sending email via .net core 3 using Worker Service

    csharp html asp-net dotnet linq
    4
    0 Votes
    4 Posts
    7 Views
    Richard DeemingR
    NB: I hope that's not your real GMail username and password that you've just posted to a public forum? :doh: If it is, you should change your password immediately, and review your account for any suspicious activity. But I would hope that Google wouldn't let you use such an insecure password. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • 0 Votes
    1 Posts
    2 Views
    No one has replied
  • 0 Votes
    2 Posts
    2 Views
    L
    [MySQL :: MySQL Connector/NET Developer Guide :: 8.1 Entity Framework 6 Support](https://dev.mysql.com/doc/connector-net/en/connector-net-entityframework60.html) It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food
  • How 7 Things Will Change The Way You Approach Online Casino

    com tutorial
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Closing and Disposing Excel Application Process in C#

    help csharp sysadmin
    2
    0 Votes
    2 Posts
    5 Views
    Richard DeemingR
    Considerations for server-side Automation of Office[^] Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment. There are various ways to create or modify Excel spreadsheets on the server without using Office interop. For example: EPPlus[^]; ClosedXML[^]; The OpenXML SDK[^]; "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • difference between interface and abstract class in c#

    csharp
    3
    0 Votes
    3 Posts
    0 Views
    S
    1)ABSTRACT CLASS -It contains both declaration and definition part. -Multiple inheritance is not achieved by abstract class. -It contain constructor. -It can contain static members. -A class can only use one abstract class. -It can be fully, partially or not implemented. -An abstract class can have non-abstract methods. 2)INTERFACE -It contains only a declaration part. -Multiple inheritance is achieved by interface. -It does not contain constructor. -It does not contain static members. -A class can use multiple interface. -It should be fully implemented. -Interface has only abstract methods.