azure entity framework: new table is not created, internal server error when trying to insert data
i am stuck here for days now: all i want is to create a table called useritems and upload data into it, this is my middleware: [Route("tables/useritem")] public class tblUserController : TableController<UserItem> { public…
Getting invalid foreign key constraint error when running database update
I understand what the error means, and I can edit the migration for the specific foreign keys to set Delete Action to NoAction... However, I shouldn't be getting this error. As you can see in the discussion below, Angela was able to create my exact…
How to migrate from entity frame work 6 to ef 7 i upgraded to ef 7 but not getting the latest features i an using repository pattern
How to migrate from entity frame work 6 to ef 7 i upgraded to ef 7 but not getting the latest features i an using repository pattern i have update to dotnet 7 and ef 7 but nothing helped
Joint multiple table entitiframework code first in .netcore 6 using models
I am new to entityframework code first approach. i am using .net core 6 .I want to develope doctors patient appointment project. So i am creating 3 enties. 1) Patient entity - Keeping patient Information 2) Staff entity- Keeping Doctors information…
Entity Framework Core SELECT from EF3
I have an EF 3 LINQ Query that I'm trying to translate to EF CORE and it's not working. Can anyone help and point me to a good EF CORE documentation? We've upgraded a .NET 3 WebAPI EF 3 to .NET 6 using EF CORE and it's becoming a nightmare. My…
how to save two tables linked by one to several simultaneously
for example Car and Simultaneous Image by first recovering the primary key of the car and assigning to the different images in a single Linq c# request
Migrating EF6 to EF Core 6.0 - Properties in partial class
Hello, Properties added in partial classes are recognized with EF6. With EF Core 6.0, there is no error when compiling, but an error occurs when loading data, new properties are not recognized. As a workaround, we moved the new properties into a…
Limiting columns in anEF Core Query
I'm using this method to return specific rows with specific columns from a SQL DB using EntityFramework Core Even with the ".Select(x => new Tbl016" expression I still get every single column in the table. Is there a way that I can…
Configuration of entities to save summed values in database
Hi, I have two entity classes (Order, OrderItem) and one Value Object class (Money). Simplified code: public class Order { private Order() { } public int OrderId { get; private set; } public…
Why isn't my WCF/WPF service working?
This is my structure and what I did: WCF add Entity Framework IService add [OperationContract] in IService1 create DTO classes for things I needed Service in Service1 create class variable "Entity entity= new…
websecurity login not logged success althogth i have same user name and password on membership table ?
I working on c# web application i use the following code to login but it not logged success it show model state error although i have same user name and password on database so how to solve this issue please public JsonResult…
Second value in dropdown list
<select class="form-select" asp-for="SpareParts.Item" asp-items="@(new SelectList(Model.Stocks,"ItemCode","ItemName"))"> <option value="">select...</option> </select>…
LINQ Expression Could not Be Translated
Hello everyone and thanks for the help in advance. I am creating a MVC application uisng .Net 6 and EF 6 to query a database. One of the functions is needed to search a date of birth. However, when I attempt to use the following: persons =…
Another strange problem...
I am entering data into a table. During this (In the OnPostAsync scope), I do send an query to an another table, to obtain a missing data that doesn't is included in the data which comes the from. But at each try i get a strange rendered result. …
Entity Framework Core Migrations within an Agile Team
Hello everyone! I would like to get some advice on working with EFCORE 6 within an agile team. What is the best and common way of handling EFCORE migrations within teams? we need to make it easy to apply and rollback features that may involve…
SaveChangesAsync is not Working .Without SavechangesAsync Data inserted into Database
public async Task<Result<ReturnResult>> Handle(CreateDocumentTypeCommand request, CancellationToken cancellationToken) { var documentType =…
Create database from entity framework codefirst approach in server
Hi All, We are developing. netcore6 Web API using entity framework code first approach. We planned to deploy it in windows azure. How to create and deploy databases on servers? Using MySQL as database. To deploy I published…
EF6 Linq Navigation properties are always null
Here is the setup I have a product table public partial class Product { public uint Id {get; set;} public uint TypeId {get; set;} public virtual ProductType ProductTypeNavigation { get; set; } = null!; } public…
How to define foriegn key in my own classes.
Hi Folks, I am not sure if this is the right place to ask my question but it is somehow related to EF Core & Identity. I am using ASP.NET Core Identity in my project. I have added my own custom tables along with the tables created by Microsoft…
Add new Table to DbContext
Hi friends thanks for any help. But I have injected a DbContext into my controller. Since then I have added a new table to the Database that I am using with my DbContext, so obviously in my controller I dont see the new Table as a Dbset in my DbContext.…