Exemple #1
0
        public virtual ApiClientResponseModel MapBOToModel(
            BOClient boClient)
        {
            var model = new ApiClientResponseModel();

            model.SetProperties(boClient.Id, boClient.Email, boClient.FirstName, boClient.LastName, boClient.Notes, boClient.Phone);

            return(model);
        }
        public virtual BOClient MapEFToBO(
            Client ef)
        {
            var bo = new BOClient();

            bo.SetProperties(
                ef.Id,
                ef.Email,
                ef.FirstName,
                ef.LastName,
                ef.Notes,
                ef.Phone);
            return(bo);
        }
        public virtual Client MapBOToEF(
            BOClient bo)
        {
            Client efClient = new Client();

            efClient.SetProperties(
                bo.Email,
                bo.FirstName,
                bo.Id,
                bo.LastName,
                bo.Notes,
                bo.Phone);
            return(efClient);
        }
Exemple #4
0
        public virtual BOClient MapModelToBO(
            int id,
            ApiClientRequestModel model
            )
        {
            BOClient boClient = new BOClient();

            boClient.SetProperties(
                id,
                model.Email,
                model.FirstName,
                model.LastName,
                model.Notes,
                model.Phone);
            return(boClient);
        }