using System; using System.ServiceModel.Activation; using MoneyTracking.BLL; using MoneyTracking.Common; namespace MoneyTracking.Service { [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class MoneyService : IMoneyService { public ServiceResponse AddExpense(Expense expense) { var response = new ServiceResponse(); using (var manager = new ExpenseManager()) { try { response.Result = manager.AddExpense(expense); response.IsSuccess = true; } catch (Exception exception) { response.ServiceException = exception; response.IsSuccess = false; response.ErrorMessage = "Unable to add Expense"; } } return response; } public ServiceResponse UpdateExpense(Expense expense) { var response = new ServiceResponse(); return response; } public ServiceResponse DeleteExpense(Expense expense) { var response = new ServiceResponse(); return response; } public ServiceResponse GetExpenseByID(int expenseId) { var response = new ServiceResponse(); return response; } public ServiceResponse AddCategory(Category category) { var response = new ServiceResponse(); response.IsSuccess = true; return response; } public ServiceResponse UpdateCategory(Category category) { var response = new ServiceResponse(); return response; } public ServiceResponse DeleteCategory(Category category) { var response = new ServiceResponse(); return response; } public ServiceResponse GetCategoryByID(int categoryId) { var response = new ServiceResponse(); return response; } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)