Questions tagged as 'entity-framework'

1
answer

Error while executing Migrations

Friends, I have two DeliveryFee and City entities, where DeliveryFee has a City FK, when I went to remove the relationship between the two and I managed the Migration it returned the following error.    'FK_dbo.DeliveryFees_dbo.Cities_Cities_...
asked by 02.10.2017 / 19:58
0
answers

Slow Entity C # when saving image

I'm having a slow system that I created in C # using Entity Framework. At the moment I am going to save a record from an attachment, I am compressing the file. Before I check if it is .jpg or .pdf (only extensions accepted by the system). The fi...
asked by 04.10.2017 / 20:35
0
answers

Send form with file using ajax web api entity framework

I'm trying to send a file along with the form to the bank, but when I send it it returns the error 400 bad request, I do not understand why. CurriculosController // POST: api/Curriculos [ResponseType(typeof(Curriculos))] publi...
asked by 13.10.2017 / 03:09
1
answer

Unable to retrieve metadata for - Error creating Controller

I created a web project with MVC and entity framework 4.5, and MYSQL database. I added the MySql.Data MySql.Data.Entity and MySql.web I made all the settings as images below IfollowedthewalkthroughandmyBankwasaddedaspicturebelow:...
asked by 13.10.2017 / 04:06
0
answers

Call Controller Search Action

I have an Action in My controller that calls a Service that does a Search using Stored Procedure and returns me a List. I made the form in the View to call this Action, only it is not calling Follow the Codes for each Process Search Form &l...
asked by 02.10.2017 / 14:27
1
answer

Change PrimaryKey EntityFramework

How to change a primary key using EntityFramework? I have a table with simple PK and need to change this PK through EntityFramework.     
asked by 27.09.2017 / 13:33
0
answers

Error creating controller using Entity

In my Employee Master project I have the following folders: MODEL CONTROLLERS DAL VIEWS From the moment I create a controller using Entity that already creates my view directly, it gives the error:    (Error executing the sel...
asked by 26.09.2017 / 21:39
0
answers

error while doing enable-migrations in visual studio in an mvc project

I'm trying to connect my project to my local bank.    andmyconnectstringisbelow.  <addname="DefaultConnection" connectionString="Data Source=LAPTOP-QEGG9P00;Initial Catalog=Portal_Recarga_Virtual;Integrated Security=False;Encrypt=False;Tru...
asked by 10.09.2017 / 03:00
0
answers

How to create composite key and ensure the same property in 2 model

I have 3 models public class UnidadeNegocio { public int Id { get; set; } public string Nome { get; set; } } public class Cliente { public int Id { get; set; } public int UnidadeNegocioId { get; set; } public string Nome {...
asked by 10.09.2017 / 00:42
1
answer

Error saving record without choosing category in dropdownlist

I'm having a problem clicking on save with some data filled up, giving me error how could I solve it. ClickingsavefromthiserrorThisisthecontrollertocreate        publicActionResultCreate(Empresaempresa){if(ModelState.IsValid){db.Empresas.Ad...
asked by 09.09.2017 / 02:03