Exemplo n.º 1
0
        public async Task <Profile> Update(Profile profile)
        {
            var updatedProfile = _profileAccess.Update <Profile>("ProfileId", profile.ProfileId, profile, new List <string> {
                "isPrincipal",
                "Presentation",
                "PastPro",
                "WhyMe",
                "Advantage",
                "Price"
            });

            if (profile.Cv != null)
            {
                updatedProfile.Cv = _documentAccess.Update <Document>("DocumentId", profile.DocumentId_CV, profile.Cv, new List <string> {
                    "Title",
                    "Created",
                    "DocumentBase64",
                    "Type"
                });
            }

            if (profile.Photo != null)
            {
                updatedProfile.Photo = _documentAccess.Update <Document>("DocumentId", profile.DocumentId_Photo, profile.Photo, new List <string> {
                    "Title",
                    "Created",
                    "DocumentBase64",
                    "Type"
                });
            }

            return(updatedProfile);
        }
Exemplo n.º 2
0
        public Document Update(Document document)
        {
            var updatedDocument = _documentAccess.Update <Document>("DocumentId", document.DocumentId, document, new List <string> {
                "Title",
                "Type",
                "Created",
                "DocumentBase64"
            });

            return(updatedDocument);
        }