Mobile Internet server interface

Source: Internet
Author: User

In mobile Internet projects, you often need to write service controllers and return JSON data for the client.

This is a general syntax.

 
PublicJsonresult getdatas (LongUpdatetime1,LongUpdatetime2 ){VaRResult =NewResult <dataresult>(); // Custom result <t> type result. Data=NewDatabll (). getfolders (updatetime1, updatetime2 );ReturnJSON (result, jsonrequestbehavior. allowget );}

This will be written in BLL.

  Public  dataresult getfolders ( long  updatetime1,  long   updatetime2) {  return   New   dataresult () {data1  =  New   data1dal (). get (updatetime1), data2  =  New   data2dal (). get (updatetime2) };} 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.