public IHttpActionResult Update(Rp3.Test.Common.Models.Account account)
        {
            using (DataService service = new DataService())
            {
                Rp3.Test.Data.Models.Account accountModel = new Test.Data.Models.Account();
                accountModel.Email     = account.Email;
                accountModel.FullName  = account.FullName;
                accountModel.AccountId = account.AccountId;

                service.Accounts.Update(accountModel);
                service.SaveChanges();
            }

            return(Ok(true));
        }
        public IHttpActionResult GetById(int accountId)
        {
            Rp3.Test.Common.Models.Account commonModel = null;
            using (DataService service = new DataService())
            {
                var model = service.Accounts.GetByID(accountId);

                commonModel = new Common.Models.Account()
                {
                    Email    = model.Email,
                    FullName = model.FullName
                };
            }
            return(Ok(commonModel));
        }
        public IHttpActionResult Insert(Rp3.Test.Common.Models.Account account)
        {
            using (DataService service = new DataService())
            {
                Rp3.Test.Data.Models.Account accountModel = new Test.Data.Models.Account();
                accountModel.Email    = account.Email;
                accountModel.FullName = account.FullName;

                accountModel.AccountId = service.Accounts.GetMaxValue <int>(p => p.AccountId, 0) + 1;

                service.Accounts.Insert(accountModel);
                service.SaveChanges();
            }

            return(Ok(true));
        }