Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
TimeSpan and save
|
|||
|---|---|---|---|
|
#18+
Добрый день. Есть модель с типами [DataType(DataType.Time)] [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:hh:mm tt}")] public TimeSpan? Time_Finish { get; set; } инпуты так @Html.TextBoxFor(model => model.Time_Finish, new { @class = "form-control", @placeholder = "ГГ:ХХ" }) @Html.ValidationMessageFor(model => model.Time_Finish, "", new { @class = "text-danger" }) поверху еще http://eonasdan.github.io/bootstrap-datetimepicker/#custom-formats навернут с такой инициализацией Код: javascript 1. 2. 3. 4. 5. 6. 7. 8. 9. В таблице MS SQL есть поле [Time_Finish] [time](0) NULL Запись в базу при помощи EF 6.0 ххххх.Time_Finish = model.Time_Finish; в 99.5 % (примерно) срабатывает, но иногда получаю в логе (логируется catch (EntityCommandExecutionException er) ) такую вот сообщение и соответсвенно откат сохранения кратко Код: c# 1. Помогите разобраться откуда точка берется в TimeSpan ? Спасибо =полностью_текст_ошибки System.Data.Entity.Infrastructure.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.Entity.Core.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.OverflowException: SqlDbType.Time overflow. Value '17.00:00:00' is out of range. Must be between 00:00:00.0000000 and 23:59:59.9999999. at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc, Boolean sync, TaskCompletionSource`1 completion, Int32 startRpc, Int32 startParam) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext) at System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.Execute(Dictionary`2 identifierValues, List`1 generatedValues) at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() --- End of inner exception stack trace --- at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) at System.Data.Entity.Internal.InternalContext.SaveChanges() --- End of inner exception stack trace --- ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.04.2015, 11:33 |
|
||
|
|

start [/forum/topic.php?fid=18&msg=38941425&tid=1356541]: |
0ms |
get settings: |
10ms |
get forum list: |
14ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
26ms |
get topic data: |
10ms |
get forum data: |
3ms |
get page messages: |
41ms |
get tp. blocked users: |
1ms |
| others: | 252ms |
| total: | 361ms |

| 0 / 0 |
