TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ramco Ramco
452
2.8k
400.3k
Display only few fields in Get method
Feb 17 2021 1:35 PM
Hi
I have below 2 classes . IN Controller Action method iwant to display only Id , Name , Email , Department Name in Get Method.
public
partial
class
Employee
{
public
Employee()
{
CreatedOn = DateTime.Now;
}
public
int
ID {
get
;
set
; }
public
string
Name {
get
;
set
; }
public
string
Email {
get
;
set
; }
public
string
Gender {
get
;
set
; }
public
Nullable<
int
> Salary {
get
;
set
; }
public
Nullable<
int
> DepartmentId {
get
;
set
; }
public
string
Active {
get
;
set
; }
[Display(Name =
"Created On"
)]
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString =
"{0:dd/MM/yyyy}"
)]
public
Nullable<System.DateTime> CreatedOn {
get
;
set
; }
public
Nullable<System.DateTime> UpdatedOn {
get
;
set
; }
public
virtual
Department Department {
get
;
set
; }
}
public
int
ID {
get
;
set
; }
public
string
ShortName {
get
;
set
; }
public
string
Description {
get
;
set
; }
public
virtual
ICollection<Employee> Employees {
get
;
set
; }
Thanks
Reply
Answers (
4
)
Displaying realtime data in clients
I want to run IOS application made using Swift on windows 10