Skip to main content
Tweeted twitter.com/StackOverflowPT/status/1413150894829412361
adicionou 80 caracteres ao conteúdo
Fonte Link
Jéf Bueno
  • 69,8mil
  • 22
  • 134
  • 244

  

em System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() em System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) em System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func2 updateFunction) em System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() em System.Data.Entity.Core.Objects.ObjectContext.<SaveChangesToStore>b__35() em System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) em System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) em System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() em System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) em System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) em System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) em System.Data.Entity.Internal.InternalContext.SaveChanges()

em
 System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
 em
 System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.<Update>b__2(UpdateTranslator
 ut)    em
 System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T
 noChangesResult, Func\`2 updateFunction)    em
 System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update()  
 em
 System.Data.Entity.Core.Objects.ObjectContext.<SaveChangesToStore>b__35()
 em
 System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func\`1
 func, IDbExecutionStrategy executionStrategy, Boolean
 startLocalTransaction, Boolean releaseConnectionOnSuccess)    em
 System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions
 options, IDbExecutionStrategy executionStrategy, Boolean
 startLocalTransaction)    em
 System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.<SaveChangesInternal>b__27()
 em
 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1
 operation)    em
 System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions
 options, Boolean executeInExistingTransaction)    em
 System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions
 options)    em
 System.Data.Entity.Internal.InternalContext.SaveChanges()

 

em System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() em System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.b__2(UpdateTranslator ut) em System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func2 updateFunction) em System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update() em System.Data.Entity.Core.Objects.ObjectContext.<SaveChangesToStore>b__35() em System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) em System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) em System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.b__27() em System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) em System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) em System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) em System.Data.Entity.Internal.InternalContext.SaveChanges()

 

em
 System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
 em
 System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.<Update>b__2(UpdateTranslator
 ut)    em
 System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T
 noChangesResult, Func\`2 updateFunction)    em
 System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update()  
 em
 System.Data.Entity.Core.Objects.ObjectContext.<SaveChangesToStore>b__35()
 em
 System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func\`1
 func, IDbExecutionStrategy executionStrategy, Boolean
 startLocalTransaction, Boolean releaseConnectionOnSuccess)    em
 System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions
 options, IDbExecutionStrategy executionStrategy, Boolean
 startLocalTransaction)    em
 System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.<SaveChangesInternal>b__27()
 em
 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1
 operation)    em
 System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions
 options, Boolean executeInExistingTransaction)    em
 System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions
 options)    em
 System.Data.Entity.Internal.InternalContext.SaveChanges()
tags editadas
Link
Marconcilio Souza
  • 12,6mil
  • 10
  • 40
  • 106
adicionou 1731 caracteres ao conteúdo
Fonte Link
Marconcilio Souza
  • 12,6mil
  • 10
  • 40
  • 106

No banco de dados os tipo estão sendo criados com os tipo correto, a unica coisa que achei estranho foi a linha;

ALTER TABLE [dbo].[Usuarios] ADD DEFAULT ('1900-01-01T00:00:00.000') FOR

para cada campo do tipo datetime

USE [ControleOrcamentario]
GO

/****** Object:  Table [dbo].[Usuarios]    Script Date: 23/11/2016 16:59:49 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Usuarios](
    [idUsuario] [int] IDENTITY(1,1) NOT NULL,
    [nomeUsuario] [nvarchar](100) NOT NULL,
    [obsUsuario] [nvarchar](2000) NULL,
    [email] [nvarchar](100) NULL,
    [login] [nvarchar](100) NULL,
    [senha] [nvarchar](200) NULL,
    [telefone] [nvarchar](15) NULL,
    [celular] [nvarchar](15) NULL,
    [cpf] [nvarchar](14) NULL,
    [nroMatricula] [nvarchar](20) NULL,
    [senhaTemp] [bit] NOT NULL,
    [ativo] [bit] NOT NULL,
    [bloqueado] [bit] NOT NULL,
    [dtAdmissao] [datetime] NOT NULL,
    [dtNascimento] [datetime] NOT NULL,
    [dtInclusao] [datetime] NOT NULL,
    [SeqAlteracao] [timestamp] NOT NULL,
 CONSTRAINT [PK_dbo.Usuarios] PRIMARY KEY CLUSTERED 
(
    [idUsuario] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[Usuarios] ADD  DEFAULT ('1900-01-01T00:00:00.000') FOR [dtAdmissao]
GO

ALTER TABLE [dbo].[Usuarios] ADD  DEFAULT ('1900-01-01T00:00:00.000') FOR [dtNascimento]
GO

ALTER TABLE [dbo].[Usuarios] ADD  DEFAULT ('1900-01-01T00:00:00.000') FOR [dtInclusao]
GO

No banco de dados os tipo estão sendo criados com os tipo correto, a unica coisa que achei estranho foi a linha;

ALTER TABLE [dbo].[Usuarios] ADD DEFAULT ('1900-01-01T00:00:00.000') FOR

para cada campo do tipo datetime

USE [ControleOrcamentario]
GO

/****** Object:  Table [dbo].[Usuarios]    Script Date: 23/11/2016 16:59:49 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Usuarios](
    [idUsuario] [int] IDENTITY(1,1) NOT NULL,
    [nomeUsuario] [nvarchar](100) NOT NULL,
    [obsUsuario] [nvarchar](2000) NULL,
    [email] [nvarchar](100) NULL,
    [login] [nvarchar](100) NULL,
    [senha] [nvarchar](200) NULL,
    [telefone] [nvarchar](15) NULL,
    [celular] [nvarchar](15) NULL,
    [cpf] [nvarchar](14) NULL,
    [nroMatricula] [nvarchar](20) NULL,
    [senhaTemp] [bit] NOT NULL,
    [ativo] [bit] NOT NULL,
    [bloqueado] [bit] NOT NULL,
    [dtAdmissao] [datetime] NOT NULL,
    [dtNascimento] [datetime] NOT NULL,
    [dtInclusao] [datetime] NOT NULL,
    [SeqAlteracao] [timestamp] NOT NULL,
 CONSTRAINT [PK_dbo.Usuarios] PRIMARY KEY CLUSTERED 
(
    [idUsuario] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[Usuarios] ADD  DEFAULT ('1900-01-01T00:00:00.000') FOR [dtAdmissao]
GO

ALTER TABLE [dbo].[Usuarios] ADD  DEFAULT ('1900-01-01T00:00:00.000') FOR [dtNascimento]
GO

ALTER TABLE [dbo].[Usuarios] ADD  DEFAULT ('1900-01-01T00:00:00.000') FOR [dtInclusao]
GO
Fonte Link
Marconcilio Souza
  • 12,6mil
  • 10
  • 40
  • 106
Carregando