Settings Page (in work)

Fixing Web hosting in Azure
This commit is contained in:
2011-03-30 02:25:27 +03:00
parent 84642c37ad
commit 833083ca0e
21 changed files with 414 additions and 105 deletions
+16
View File
@@ -11,6 +11,7 @@ using System.Text;
using MyFriendsAround.Common.Entities;
using MyFriendsAround.Data;
using MyFriendsAround.Data.BLL;
using System.Web.Configuration;
namespace MyFriendsAround.Web
{
@@ -27,6 +28,14 @@ namespace MyFriendsAround.Web
return FriendsRepository.GetFriends();
}
[OperationContract]
[WebGet(ResponseFormat = WebMessageFormat.Json)]
public List<Friend> GetFriends(int skip)
{
int take = Convert.ToInt32(WebConfigurationManager.AppSettings["takeTopFriends"]);
return FriendsRepository.GetFriends(skip, take);
}
[OperationContract]
[WebInvoke(ResponseFormat = WebMessageFormat.Json, Method = "POST")]
@@ -34,6 +43,13 @@ namespace MyFriendsAround.Web
{
return FriendsRepository.PublishLocation(friend);
}
[OperationContract]
[WebInvoke(ResponseFormat = WebMessageFormat.Json, Method = "POST")]
public bool UpdatePicture(string userId, byte[] userPicture)
{
return FriendsRepository.UpdatePicture(userId, userPicture);
}
}
}