f 相关的软件列表

asp.net mvc 全局设置JsonRequestBehavior.AllowGet
Asp.net

asp.net mvc 全局设置JsonRequestBehavior.AllowGet

2020-07-21 标签:asp.net,mvc,全局,设置,JsonRequestBehavior,AllowGet,public,Behavior,result,class,filterContext,Controller,如下,private,get,set,override

asp.net mvc 全局设置JsonRequestBehavior.AllowGet,代码如下:public class JsonRequestBehaviorAttribute : ActionFilterAttribute{private JsonRequestBehavior Behavi

asp.net api webform swagger忽略某控制器不生成文档
Asp.net

asp.net api webform swagger忽略某控制器不生成文档

2020-07-20 标签:asp.net,api,webform,swagger,忽略,控制器,生成,文档,IgnoreApi,true,Json,controller,BaseController,ApiExplorerSettings,public,HttpResponseMessage,obj,string

今天在用asp.net api webform swagger自动生成api文档时,发现默认是全部控制器(controller)都会生成api文档的,但实际上我们有些控制器不想生成文档,比如BaseController之类的,那该如何控制呢?swagger忽略某控制器不生成文档的代码如下

asp.net web api 自定义返回json的datetime格式
Asp.net

asp.net web api 自定义返回json的datetime格式

2020-07-19 标签:asp.net,web,api,自定义,返回,json,datetime,格式,配置,设置,GlobalConfiguration,Configuration,Formatters,JsonFormatter,SerializerSettings,DateFormatString,yyyy,MM,dd

上一篇说到,《asp.net web api 设置默认返回json格式》 但是返回的json中的日期格式都是带T等字母的,现在是想要返回自己定义json格式的配置,这要怎么配置呢?还是在配置那里设置,差不多一样的。自定义返回json的datetime格式的代码如下:GlobalConfi

asp.net web api 设置默认返回json格式
Asp.net

asp.net web api 设置默认返回json格式

2020-07-17 标签:asp.net,web,api,设置,默认,返回,json,格式,代码,webform,Web,Api,xml,GlobalConfiguration,Configuration,Formatters,XmlFormatter,SupportedMediaTypes,Clear

上一遍文章写到,但是默认是返回xml格式的,能不能设置默认返回json格式呢?答案是当然可以的!代码如下:GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear()

asp.net webform 使用Web Api接口
Asp.net

asp.net webform 使用Web Api接口

2020-07-15 标签:asp.net api,webform api,asp.net web api,asp.net开发api,asp.net,webform,使用,Web,Api,接口,api,web,config,添加,Application,Start,void,WebApiConfig,Register

公司目前还是使用asp.net webform开发,打算搞个web api,目前很多都是基于mvc的,但也是可以使用asp.net webform进行web api开发的。首先在Global.asax的Application_Start添加路由注册,代码如下:protected void

sqlserver float 5E-05 MSSQL xE-05 xE-06 xE-07 xE-08问题解决方法
SQLServer

sqlserver float 5E-05 MSSQL xE-05 xE-06 xE-07 xE-08问题解决方法

2020-07-15 标签:sqlserver,float,5E-05,MSSQL,xE-05,xE-06,xE-07,xE-08,0.00005,bug,decimal,字段,类型

今天用sqlserver 的float字段类型存超过四位小数之后,会有问题.类似0.00005这种.小数前是0这种,会存储显示成5E-05 xE-05 xE-06 xE-07 xE-08,如图:找了下资料,没有说是bug问题.应该是精度的问题导致,改成decimal类型指定精度就好了.

You cannot use single-statement control-flow statements in CSHTML pages
C#.net

You cannot use single-statement control-flow statements in CSHTML pages

2020-07-05 标签:You,cannot,use,single,statement,control,flow,statements,CSHTML,pages,isLoggedIn,user,ldquo,rdquo,语句,cshtml,xxx,Hello,页面

今天在写cshtml页面报错:An error occurred during the compilation of a resource required to process this request. Please review the following specific err

Mysql Column 'status' in where clause is ambiguous 错误解决方法
MySQL

Mysql Column 'status' in where clause is ambiguous 错误解决方法

2020-07-05 标签:Mysql,Column,status,clause,ambiguous,错误,解决,方法,join,查询,多表,报错,inner,left,表中,表名,解决办法,数据库

今天在用Mysql数据库查询的时候报错:Column 'status' in where clause is ambiguous。出现这个错误是因为用inner join或left join等多表关联查询时,两个或多个表中存在相同的字段却没有指明表名导致。解决办法也很简单

.netcore引用程序集或程序包生成时输出到目录
C#.net

.netcore引用程序集或程序包生成时输出到目录

2020-06-26 标签:netcore,引用,程序,程序包,输出,目录,PropertyGroup,TargetFramework,Configurations,右击,netstandard2.0,Debug,Release,Test,true,项目,节点,代码

.netcore引用程序集或程序包输出到目录,右击.netcore项目,编辑项目文件:代码如下,其中CopyLocalLockFileAssemblies节点便是netstandard2.0Debug;Release;Testtrue

详解免费开源的DotNet任务调度组件Quartz.NET
C#.net

详解免费开源的DotNet任务调度组件Quartz.NET

2020-06-26 标签:详解,免费,开源,dotnet,任务,调度,组件,quartz,net,介绍,软件,项目,中都,会使,用到,定时,轮询,数据库,同步

很多的软件项目中都会使用到定时任务、定时轮询数据库同步,定时邮件通知等功能。.NET Framework具有“内置”定时器功能,通过System.Timers.Timer类。在使用Timer类需要面对的问题:计时器没有持久化机制;计时器具有不灵活的计划(仅能设置开始时间和重复间隔,没有基于日期,时间